X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5a97de8c98502af9f74cfceb924fa02e0fd80925..5ec2b80b686983f84ebab7c7398a29e73286deee:/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 313a147beb..2f3cb24f7f 100644 --- a/teshsuite/smpi/mpich3-test/group/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/group/CMakeLists.txt @@ -1,57 +1,26 @@ -cmake_minimum_required(VERSION 2.6) - if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") - add_executable(groupcreate groupcreate.c) -# add_executable(groupnullincl groupnullincl.c) - add_executable(grouptest2 grouptest2.c) - add_executable(grouptest grouptest.c) - add_executable(gtranks gtranks.c) - add_executable(gtranksperf gtranksperf.c) - - target_link_libraries(groupcreate simgrid mtest_c) -# target_link_libraries(groupnullincl simgrid mtest_c) - target_link_libraries(grouptest2 simgrid mtest_c) - target_link_libraries(grouptest simgrid mtest_c) - target_link_libraries(gtranks simgrid mtest_c) - target_link_libraries(gtranksperf simgrid mtest_c) + foreach(file groupcreate grouptest2 grouptest gtranks gtranksperf) #groupnullincl glpid + add_executable(${file} EXCLUDE_FROM_ALL ${file}.c) + add_dependencies(tests ${file}) + 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=${VALGRIND_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) +