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

Moves target_link_libraries() and target_compile_features() from cmak… #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ target_include_directories(xtensor-blas
$<BUILD_INTERFACE:${XTENSOR_BLAS_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>)

target_compile_features(xtensor-blas INTERFACE cxx_std_14)

OPTION(CXXBLAS_DEBUG "print cxxblas debug information" OFF)
OPTION(XTENSOR_USE_FLENS_BLAS "use FLENS generic implementation instead of cblas" OFF)
# Decide whether to use OpenBLAS or not.
Expand Down
7 changes: 3 additions & 4 deletions xtensor-blasConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ if(NOT TARGET @PROJECT_NAME@)
get_target_property(@PROJECT_NAME@_INCLUDE_DIRS xtensor-blas INTERFACE_INCLUDE_DIRECTORIES)
find_dependency(BLAS REQUIRED)
find_dependency(LAPACK REQUIRED)
target_link_libraries(xtensor-blas INTERFACE ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.8)
target_compile_features(xtensor-blas INTERFACE cxx_std_14)
endif()
tdegeus marked this conversation as resolved.
Show resolved Hide resolved
set_target_properties(xtensor-blas PROPERTIES
INTERFACE_LINK_LIBRARIES "${BLAS_LIBRARIES};${LAPACK_LIBRARIES}"
)
endif()

set(PN xtensor_blas)
Expand Down