diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-07-16 18:55:40 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-07-16 18:55:40 +0200 |
commit | add57574881f7389ce4a3f82934907420945b0f4 (patch) | |
tree | 392ff798a1f541c0fe412ae46058cc84250b177c /unsupported/test/CMakeLists.txt | |
parent | 901c7d31f026cce75816cf5d954e42f22f6f5691 (diff) |
Simplify handling and non-splitted tests and include split_test_helper.h instead of re-generating it. This also allows us to modify it without breaking existing build folder.
Diffstat (limited to 'unsupported/test/CMakeLists.txt')
-rw-r--r-- | unsupported/test/CMakeLists.txt | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index 02fb890c6..73befbca1 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -1,16 +1,7 @@ -# generate split test header file only if it does not yet exist -# in order to prevent a rebuild every time cmake is configured -if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h "") - foreach(i RANGE 1 999) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h - "#if defined(EIGEN_TEST_PART_${i}) || defined(EIGEN_TEST_PART_ALL)\n" - "#define CALL_SUBTEST_${i}(FUNC) CALL_SUBTEST(FUNC)\n" - "#else\n" - "#define CALL_SUBTEST_${i}(FUNC)\n" - "#endif\n\n" - ) - endforeach() +# The file split_test_helper.h was generated at first run, +# it is now included in test/ +if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h) + file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h) endif() set_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT "Unsupported") |