Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add std=legacy flags for f77/f90 codes that don't compile anymore with gfortran ...
[simgrid.git] / teshsuite / smpi / mpich3-test / f77 / datatype / CMakeLists.txt
index 5132564..29af36f 100644 (file)
@@ -14,10 +14,13 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   foreach(test gaddressf
              allctypesf hindex1f hindexed_blockf packef typecntsf
              typem2f typename3f typenamef typesnamef
-              typesubf)
+             typesubf)
     add_executable(${test} EXCLUDE_FROM_ALL ${test}.f)
     add_dependencies(tests ${test})
-    target_link_libraries(${test} simgrid mtest_f77)   
+    target_link_libraries(${test} simgrid mtest_f77)
+    if((CMAKE_Fortran_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9.99"))
+      set_property(SOURCE ${test}.f PROPERTY COMPILE_FLAGS -std=legacy)
+    endif()
   endforeach()
 endif()