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:
NeroBurner
2017-01-02 09:09:21 +01:00
parent 45199b9773
commit c4fc2611ba
3 changed files with 23 additions and 18 deletions

View File

@@ -45,10 +45,12 @@ install(TARGETS eigen_blas eigen_blas_static
if(EIGEN_Fortran_COMPILER_WORKS)
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
else()
add_subdirectory(testing EXCLUDE_FROM_ALL)
if(BUILD_TESTING)
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
else()
add_subdirectory(testing EXCLUDE_FROM_ALL)
endif()
endif()
endif()