X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bba9595ccbeef3e2b15b8d8466022821604f7f7d..29f11d3b5a25895bbd8dcaccc57e7d3bc2fa8d83:/teshsuite/smpi/mpich3-test/group/CMakeLists.txt diff --git a/teshsuite/smpi/mpich3-test/group/CMakeLists.txt b/teshsuite/smpi/mpich3-test/group/CMakeLists.txt index f801d3458b..36e1944df6 100644 --- a/teshsuite/smpi/mpich3-test/group/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/group/CMakeLists.txt @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 2.6) - -if(enable_smpi) +if(enable_smpi AND enable_smpi_MPICH3_testsuite) if(WIN32) set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") else() @@ -8,50 +6,24 @@ if(enable_smpi) set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") endif() - set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}") - include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi") + include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") - add_executable(groupcreate groupcreate.c ../util/mtest.c) - add_executable(groupnullincl groupnullincl.c ../util/mtest.c) - add_executable(grouptest2 grouptest2.c ../util/mtest.c) - add_executable(grouptest grouptest.c ../util/mtest.c) - add_executable(gtranks gtranks.c ../util/mtest.c) - add_executable(gtranksperf gtranksperf.c ../util/mtest.c) - - target_link_libraries(groupcreate simgrid) - target_link_libraries(groupnullincl simgrid) - target_link_libraries(grouptest2 simgrid) - target_link_libraries(grouptest simgrid) - target_link_libraries(gtranks simgrid) - target_link_libraries(gtranksperf simgrid) + foreach(file groupcreate grouptest2 grouptest gtranks gtranksperf) #groupnullincl glpid + add_executable(${file} ${file}.c) + target_link_libraries(${file} simgrid mtest_c) + endforeach() +endif() +if (enable_smpi_MPICH3_testsuite AND HAVE_RAW_CONTEXTS) + ADD_TEST(test-smpi-mpich3-group-raw ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/group ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests "-wrapper=${TESH_WRAPPER}" -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/group -tests=testlist -execarg=--cfg=contexts/factory:raw) + SET_TESTS_PROPERTIES(test-smpi-mpich3-group-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!") endif() -set(tesh_files - ${tesh_files} - PARENT_SCOPE - ) -set(xml_files - ${xml_files} - PARENT_SCOPE - ) -set(examples_src - ${examples_src} - ${CMAKE_CURRENT_SOURCE_DIR}/groupcreate.c - ${CMAKE_CURRENT_SOURCE_DIR}/groupnullincl.c - ${CMAKE_CURRENT_SOURCE_DIR}/grouptest2.c - ${CMAKE_CURRENT_SOURCE_DIR}/grouptest.c - ${CMAKE_CURRENT_SOURCE_DIR}/gtranks.c - ${CMAKE_CURRENT_SOURCE_DIR}/gtranksperf.c - PARENT_SCOPE - ) -set(bin_files - ${bin_files} - PARENT_SCOPE - ) -set(txt_files - ${txt_files} - ${CMAKE_CURRENT_SOURCE_DIR}/testlist - PARENT_SCOPE - ) +foreach(file groupcreate grouptest2 grouptest gtranks gtranksperf groupnullincl glpid) + set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c) +endforeach() + +set(examples_src ${examples_src} PARENT_SCOPE) +set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/testlist PARENT_SCOPE) +