X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1e2d381b2c5cbb3d1f6f8ef57e19eded277ab311..17fb4b64f0bfb6f25debbcbdf4577812284e6e9e:/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt diff --git a/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt index 3218a78d64..a8a45ce22c 100644 --- a/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt @@ -1,14 +1,10 @@ -if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - 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/smpif90") - endif() +if(enable_smpi AND enable_testsuite_smpi_MPICH3 AND SMPI_FORTRAN) + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") - foreach(test gaddressf90 typesnamef90 structf + foreach(test gaddressf90 typesnamef90 structf # allctypesf90 createf90 get_elem_d get_elem_u hindex1f90 indtype kinds @@ -17,7 +13,10 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) typesubf90) add_executable(${test} EXCLUDE_FROM_ALL ${test}.f90) add_dependencies(tests ${test}) - target_link_libraries(${test} simgrid mtest_f90) + target_link_libraries(${test} simgrid mtest_f90) + if((CMAKE_Fortran_COMPILER_ID MATCHES "GNU") AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "10.0")) + set_property(SOURCE ${test}.f90 PROPERTY COMPILE_FLAGS -std=legacy) + endif() endforeach() endif()