mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 03:09:01 +08:00
add cmake-option to enable/disable creation of tests
* * * disable unsupportet/test when test are disabled * * * rename EIGEN_ENABLE_TESTS to BUILD_TESTING * * * consider BUILD_TESTING in blas
This commit is contained in:
parent
45199b9773
commit
c4fc2611ba
@ -416,16 +416,15 @@ add_subdirectory(Eigen)
|
|||||||
|
|
||||||
add_subdirectory(doc EXCLUDE_FROM_ALL)
|
add_subdirectory(doc EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
include(EigenConfigureTesting)
|
option(BUILD_TESTING "Enable creation of Eigen tests." ON)
|
||||||
|
if(BUILD_TESTING)
|
||||||
|
include(EigenConfigureTesting)
|
||||||
|
|
||||||
# fixme, not sure this line is still needed:
|
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
||||||
enable_testing() # must be called from the root CMakeLists, see man page
|
add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
||||||
|
else()
|
||||||
|
add_subdirectory(test EXCLUDE_FROM_ALL)
|
||||||
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
endif()
|
||||||
add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
|
||||||
else()
|
|
||||||
add_subdirectory(test EXCLUDE_FROM_ALL)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
||||||
@ -461,7 +460,9 @@ endif(NOT WIN32)
|
|||||||
|
|
||||||
configure_file(scripts/cdashtesting.cmake.in cdashtesting.cmake @ONLY)
|
configure_file(scripts/cdashtesting.cmake.in cdashtesting.cmake @ONLY)
|
||||||
|
|
||||||
ei_testing_print_summary()
|
if(BUILD_TESTING)
|
||||||
|
ei_testing_print_summary()
|
||||||
|
endif()
|
||||||
|
|
||||||
message(STATUS "")
|
message(STATUS "")
|
||||||
message(STATUS "Configured Eigen ${EIGEN_VERSION_NUMBER}")
|
message(STATUS "Configured Eigen ${EIGEN_VERSION_NUMBER}")
|
||||||
|
@ -45,10 +45,12 @@ install(TARGETS eigen_blas eigen_blas_static
|
|||||||
|
|
||||||
if(EIGEN_Fortran_COMPILER_WORKS)
|
if(EIGEN_Fortran_COMPILER_WORKS)
|
||||||
|
|
||||||
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
if(BUILD_TESTING)
|
||||||
add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
||||||
else()
|
add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
||||||
add_subdirectory(testing EXCLUDE_FROM_ALL)
|
else()
|
||||||
|
add_subdirectory(testing EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
add_subdirectory(Eigen)
|
add_subdirectory(Eigen)
|
||||||
add_subdirectory(doc EXCLUDE_FROM_ALL)
|
add_subdirectory(doc EXCLUDE_FROM_ALL)
|
||||||
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
if(BUILD_TESTING)
|
||||||
add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
||||||
else()
|
add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
||||||
add_subdirectory(test EXCLUDE_FROM_ALL)
|
else()
|
||||||
|
add_subdirectory(test EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user