diff --git a/CMakeLists.txt b/CMakeLists.txt index 66aa721..1584b6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,8 @@ target_include_directories(xtensor-blas $ $) +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. diff --git a/xtensor-blasConfig.cmake.in b/xtensor-blasConfig.cmake.in index f700e55..6b4c2ff 100644 --- a/xtensor-blasConfig.cmake.in +++ b/xtensor-blasConfig.cmake.in @@ -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() + set_target_properties(xtensor-blas PROPERTIES + INTERFACE_LINK_LIBRARIES "${BLAS_LIBRARIES};${LAPACK_LIBRARIES}" + ) endif() set(PN xtensor_blas)