Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
A for-loop with 'num' modified in the body is too complex according to Sonar.
[simgrid.git] / teshsuite / smpi / mpich3-test / CMakeLists.txt
1 set(bin_files  ${bin_files}  ${CMAKE_CURRENT_SOURCE_DIR}/generate_report  PARENT_SCOPE)
2
3 if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
4 else()
5     foreach(srcfile ${stdo_std_smpi})
6         set(dstfile ${srcfile})
7         string(REPLACE "${CMAKE_HOME_DIRECTORY}" "${CMAKE_BINARY_DIR}" dstfile "${dstfile}")
8         #message("copy ${srcfile} to ${dstfile}")
9         configure_file("${srcfile}" "${dstfile}" COPYONLY)
10     endforeach()
11 endif()
12
13 set(txt_files  ${txt_files}  ${CMAKE_CURRENT_SOURCE_DIR}/README
14                              ${CMAKE_CURRENT_SOURCE_DIR}/runtests
15                              ${CMAKE_CURRENT_SOURCE_DIR}/testlist
16                              ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
17                              ${CMAKE_CURRENT_SOURCE_DIR}/checktests
18                              ${CMAKE_CURRENT_SOURCE_DIR}/generate_report
19                              ${CMAKE_CURRENT_SOURCE_DIR}/util/dtypes.c
20                              ${CMAKE_CURRENT_SOURCE_DIR}/util/mtest.c
21                              ${CMAKE_CURRENT_SOURCE_DIR}/util/mtestcheck.c
22                              ${CMAKE_CURRENT_SOURCE_DIR}/util/mtest_datatype.c
23                              ${CMAKE_CURRENT_SOURCE_DIR}/util/mtest_datatype_gen.c
24                              ${CMAKE_CURRENT_SOURCE_DIR}/f77/testlist
25                              ${CMAKE_CURRENT_SOURCE_DIR}/f90/testlist
26                              ${CMAKE_CURRENT_SOURCE_DIR}/include/dtypes.h
27                              ${CMAKE_CURRENT_SOURCE_DIR}/include/mpicolltest.h
28                              ${CMAKE_CURRENT_SOURCE_DIR}/include/mpitestconf.h
29                              ${CMAKE_CURRENT_SOURCE_DIR}/include/mpitestcxx.h
30                              ${CMAKE_CURRENT_SOURCE_DIR}/include/mpitest.h
31                              ${CMAKE_CURRENT_SOURCE_DIR}/include/mpithreadtest.h
32                              ${CMAKE_CURRENT_SOURCE_DIR}/include/mtest_datatype.h
33                              ${CMAKE_CURRENT_SOURCE_DIR}/include/mpitest.h                            PARENT_SCOPE)
34
35 #build only once files used in each test (C version compiled here at root, F77 is in f77/util, and F90 in F90/util)
36
37 if(WIN32)
38   set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
39 else()
40   set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
41 endif()
42
43 include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
44 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/")
45
46 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
47   if(HAVE_PRIVATIZATION)
48     add_library(mtest_c STATIC util/dtypes.c util/mtest.c  util/mtestcheck.c  util/mtest_datatype.c util/mtest_datatype_gen.c)
49   else()
50     message(FATAL_ERROR "MPICH testsuite needs privatization. Use a modern OS.")
51   endif()
52 endif()
53
54 IF(enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
55   ADD_TEST(test-smpi-mpich3-thread-f77     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f77/ ${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/f77/ -tests=testlist -privatization=${HAVE_PRIVATIZATION} -execarg=--cfg=contexts/stack-size:8000 -execarg=--cfg=contexts/factory:thread -execarg=--cfg=smpi/privatization:${HAVE_PRIVATIZATION})
56   SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f77 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
57   ADD_TEST(test-smpi-mpich3-thread-f90     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f90/ ${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/f90/ -tests=testlist -privatization=${HAVE_PRIVATIZATION} -execarg=--cfg=smpi/privatization:${HAVE_PRIVATIZATION} -execarg=--cfg=contexts/factory:thread)
58   SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f90 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
59 ENDIF()