Simplify handling of tests that must fail to compile.

Each test is now a normal ctest target, and build properties (compiler+flags) are preserved (instead of starting a new build-dir from scratch).
This commit is contained in:
Gael Guennebaud
2018-12-12 15:48:36 +01:00
parent 37c91e1836
commit 72c0bbe2bd
4 changed files with 21 additions and 44 deletions

View File

@@ -1,4 +1,3 @@
message(STATUS "Running the failtests")
ei_add_failtest("failtest_sanity_check")
@@ -64,12 +63,3 @@ ei_add_failtest("bdcsvd_int")
ei_add_failtest("eigensolver_int")
ei_add_failtest("eigensolver_cplx")
if (EIGEN_FAILTEST_FAILURE_COUNT)
message(FATAL_ERROR
"${EIGEN_FAILTEST_FAILURE_COUNT} out of ${EIGEN_FAILTEST_COUNT} failtests FAILED. "
"To debug these failures, manually compile these programs in ${CMAKE_CURRENT_SOURCE_DIR}, "
"with and without #define EIGEN_SHOULD_FAIL_TO_BUILD.")
else()
message(STATUS "Failtest SUCCESS: all ${EIGEN_FAILTEST_COUNT} failtests passed.")
message(STATUS "")
endif()