From 7d119350ff23ada182d9b1f875daf08349db0e41 Mon Sep 17 00:00:00 2001 From: legrand Date: Thu, 20 Mar 2008 09:17:15 +0000 Subject: [PATCH] corrected min test config and avoid linking start/stop tests with the libs git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1172 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-peo/test/CMakeLists.txt | 32 +++++++++++++---------- trunk/paradiseo-peo/test/t-Mpdallexit.cpp | 2 +- trunk/paradiseo-peo/test/t-Mpdboot.cpp | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/trunk/paradiseo-peo/test/CMakeLists.txt b/trunk/paradiseo-peo/test/CMakeLists.txt index 00a9be6dc..1e6b213ab 100644 --- a/trunk/paradiseo-peo/test/CMakeLists.txt +++ b/trunk/paradiseo-peo/test/CMakeLists.txt @@ -74,18 +74,23 @@ ENDFOREACH (test) IF(ENABLE_MINIMAL_CMAKE_TESTING) SET (MIN_TEST_LIST t-MultiStart) - FOREACH (test ${TEST_RUN}) - ADD_TEST(${test} ${test}) - ENDFOREACH (test) + + FOREACH (testrun ${TEST_RUN}) + ADD_EXECUTABLE(${testrun} ${T_${testrun}_SOURCES}) + ADD_TEST(${testrun} ${testrun}) + ENDFOREACH (testrun) + FOREACH (mintest ${MIN_TEST_LIST}) SET ("T_${mintest}_SOURCES" "${mintest}.cpp") ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) ADD_TEST(${mintest} "mpiexec" "-n" "4" "${CMAKE_CURRENT_BINARY_DIR}/${mintest}" "@param") TARGET_LINK_LIBRARIES(${mintest} peo ${XML2_LIBS} rmc_mpi ga es eoutils eo peo) ENDFOREACH (mintest) - FOREACH (test ${TEST_STOP}) - ADD_TEST(${test} ${test}) - ENDFOREACH (test) + + FOREACH (teststop ${TEST_STOP}) + ADD_EXECUTABLE(${teststop} ${T_${teststop}_SOURCES}) + ADD_TEST(${teststop} ${teststop}) + ENDFOREACH (teststop) ELSEIF(ENABLE_CMAKE_TESTING) @@ -93,20 +98,19 @@ ELSEIF(ENABLE_CMAKE_TESTING) ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) ENDFOREACH (test) - FOREACH (test ${TEST_RUN}) - ADD_TEST(${test} ${test}) - ENDFOREACH (test) + FOREACH (testrun ${TEST_RUN}) + ADD_TEST(${testrun} ${testrun}) + ENDFOREACH (testrun) FOREACH (test ${TEST_LIST}) ADD_TEST(${test} "mpiexec" "-n" "4" "${CMAKE_CURRENT_BINARY_DIR}/${test}" "@param") ENDFOREACH (test) - FOREACH (test ${TEST_STOP}) - ADD_TEST(${test} ${test}) - ENDFOREACH (test) + FOREACH (teststop ${TEST_STOP}) + ADD_TEST(${teststop} ${teststop}) + ENDFOREACH (teststop) - # Link the librairies - FOREACH (test ${TEST_RUN} ${TEST_LIST} ${TEST_STOP}) + FOREACH (test ${TEST_LIST}) TARGET_LINK_LIBRARIES(${test} peo ${XML2_LIBS} rmc_mpi ga es eoutils eo peo) ENDFOREACH (test) diff --git a/trunk/paradiseo-peo/test/t-Mpdallexit.cpp b/trunk/paradiseo-peo/test/t-Mpdallexit.cpp index 53df81679..04c2839e3 100644 --- a/trunk/paradiseo-peo/test/t-Mpdallexit.cpp +++ b/trunk/paradiseo-peo/test/t-Mpdallexit.cpp @@ -34,7 +34,7 @@ * */ - +#include #include int main (int __argc, char *__argv[]) diff --git a/trunk/paradiseo-peo/test/t-Mpdboot.cpp b/trunk/paradiseo-peo/test/t-Mpdboot.cpp index 4773b482f..a394bc170 100644 --- a/trunk/paradiseo-peo/test/t-Mpdboot.cpp +++ b/trunk/paradiseo-peo/test/t-Mpdboot.cpp @@ -34,7 +34,7 @@ * */ - +#include #include int main (int __argc, char *__argv[])