Enable support for minimal rebuilds.

This commit is contained in:
Hauke Heibel
2013-07-31 16:16:08 +02:00
parent 68168e9eae
commit 39491e3b75
2 changed files with 31 additions and 22 deletions

View File

@@ -1,16 +1,17 @@
# generate split test header file
message(STATUS ${CMAKE_CURRENT_BINARY_DIR})
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
"#ifdef EIGEN_TEST_PART_${i}\n"
"#define CALL_SUBTEST_${i}(FUNC) CALL_SUBTEST(FUNC)\n"
"#else\n"
"#define CALL_SUBTEST_${i}(FUNC)\n"
"#endif\n\n"
# generate split test header file only if it does not yet exist
# in order to prevent a rebuild everytime 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
"#ifdef EIGEN_TEST_PART_${i}\n"
"#define CALL_SUBTEST_${i}(FUNC) CALL_SUBTEST(FUNC)\n"
"#else\n"
"#define CALL_SUBTEST_${i}(FUNC)\n"
"#endif\n\n"
)
endforeach()
endforeach()
endif()
# configure blas/lapack (use Eigen's ones)
set(BLAS_FOUND TRUE)