Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMakeLists.txt #142

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated by `boostdep --cmake numeric/ublas`
# Copyright 2020, 2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

cmake_minimum_required(VERSION 3.8...3.20)

project(boost_numeric_ublas VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)

add_library(boost_numeric_ublas INTERFACE)
add_library(Boost::numeric_ublas ALIAS boost_numeric_ublas)

target_include_directories(boost_numeric_ublas INTERFACE include)

target_link_libraries(boost_numeric_ublas
INTERFACE
Boost::compute
Boost::concept_check
Boost::config
Boost::core
Boost::iterator
Boost::mpl
Boost::numeric_interval
Boost::range
Boost::serialization
Boost::smart_ptr
Boost::static_assert
Boost::type_traits
Boost::typeof
)

target_compile_features(boost_numeric_ublas INTERFACE cxx_std_11)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be cxx_std_20 because of the tensor extension.
if only matrix and vector types are used cxx_std_11 is sufficient.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a deep knowledge of CMAKE. Therefore, correct me if I'm wrong. Why don't we put another cmake file inside the Tensor with the compiler feature set to c++20? Then we can include the directory.

This approach might fix the issue.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to admit that I don't have that knowledge either. But as CMAKE specification should be made modular your hint might solve this issue.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we combine PR #94 with this one?
@coder3101 did a very good job.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that should be an issue, but it's better if @pdimov answers it.


if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

add_subdirectory(test)

endif()