mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-05 20:55:12 +08:00
Adds new CMake Options for controlling build components.
This commit is contained in:
parent
b2ee235a4b
commit
cf82186416
@ -477,6 +477,9 @@ if(EIGEN_BUILD_TESTING)
|
|||||||
add_subdirectory(failtest)
|
add_subdirectory(failtest)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(CMakeDetermineFortranCompiler)
|
||||||
|
option(EIGEN_BUILD_BLAS "Toggles the building of the Eigen Blas library" ${CMAKE_Fortran_COMPILER})
|
||||||
|
option(EIGEN_BUILD_LAPACK "Toggles the building of the included Eigen LAPACK library" ${CMAKE_Fortran_COMPILER})
|
||||||
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
||||||
add_subdirectory(blas)
|
add_subdirectory(blas)
|
||||||
add_subdirectory(lapack)
|
add_subdirectory(lapack)
|
||||||
@ -611,6 +614,8 @@ set_target_properties (eigen PROPERTIES EXPORT_NAME Eigen)
|
|||||||
|
|
||||||
install (TARGETS eigen EXPORT Eigen3Targets)
|
install (TARGETS eigen EXPORT Eigen3Targets)
|
||||||
|
|
||||||
|
option(EIGEN_BUILD_CMAKE_PACKAGE "Enables the creation of EigenConfig.cmake and related files" ON)
|
||||||
|
if(EIGEN_BUILD_CMAKE_PACKAGE)
|
||||||
configure_package_config_file (
|
configure_package_config_file (
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3Config.cmake.in
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3Config.cmake.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
|
||||||
@ -655,6 +660,7 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
|
|||||||
# Add uninstall target
|
# Add uninstall target
|
||||||
add_custom_target ( uninstall
|
add_custom_target ( uninstall
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/EigenUninstall.cmake)
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/EigenUninstall.cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (EIGEN_SPLIT_TESTSUITE)
|
if (EIGEN_SPLIT_TESTSUITE)
|
||||||
ei_split_testsuite("${EIGEN_SPLIT_TESTSUITE}")
|
ei_split_testsuite("${EIGEN_SPLIT_TESTSUITE}")
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
project(EigenBlas CXX)
|
project(EigenBlas CXX)
|
||||||
|
|
||||||
|
if(EIGEN_BUILD_BLAS)
|
||||||
include(CheckLanguage)
|
include(CheckLanguage)
|
||||||
check_language(Fortran)
|
check_language(Fortran)
|
||||||
if(CMAKE_Fortran_COMPILER)
|
if(CMAKE_Fortran_COMPILER)
|
||||||
@ -59,4 +60,4 @@ if(EIGEN_BUILD_TESTING)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
project(EigenLapack CXX)
|
project(EigenLapack CXX)
|
||||||
|
|
||||||
|
if(EIGEN_BUILD_LAPACK AND EIGEN_BUILD_BLAS)
|
||||||
|
|
||||||
include(CheckLanguage)
|
include(CheckLanguage)
|
||||||
check_language(Fortran)
|
check_language(Fortran)
|
||||||
if(CMAKE_Fortran_COMPILER)
|
if(CMAKE_Fortran_COMPILER)
|
||||||
@ -457,3 +459,6 @@ if(EXISTS ${eigen_full_path_to_testing_lapack})
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
elseif(EIGEN_BUILD_LAPACK AND NOT EIGEN_BUILD_BLAS)
|
||||||
|
message(FATAL_ERROR "EIGEN_BUILD_LAPACK requires EIGEN_BUILD_BLAS")
|
||||||
|
endif() #EIGEN_BUILD_LAPACK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user