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 ...
authorAugustin Degomme <adegomme@gmail.com>
Fri, 31 Jan 2020 12:23:08 +0000 (13:23 +0100)
committerAugustin Degomme <adegomme@gmail.com>
Fri, 31 Jan 2020 12:23:08 +0000 (13:23 +0100)
teshsuite/smpi/mpich3-test/f77/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/datatype/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt

index c20537a..febf8ff 100644 (file)
@@ -17,14 +17,12 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
     add_executable(${test} EXCLUDE_FROM_ALL ${test}.f)
     add_dependencies(tests ${test})
     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()
 
-# These test seem to not compile with gfortran 10 for now, so work around that bug that is not ours
-if((CMAKE_Fortran_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9.99"))
-  set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/inplacef.f" PROPERTY COMPILE_FLAGS -fallow-argument-mismatch)
-endif()
-
 set(examples_src
   ${examples_src}
   ${CMAKE_CURRENT_SOURCE_DIR}/allredint8f.f
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()
 
index 07fc599..51e98fb 100644 (file)
@@ -10,6 +10,9 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
   add_executable(allpairf  EXCLUDE_FROM_ALL allpairf.f)
+  if((CMAKE_Fortran_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9.99"))
+    set_property(SOURCE allpairf.f PROPERTY COMPILE_FLAGS -std=legacy)
+  endif()
   add_executable(greqf    EXCLUDE_FROM_ALL greqf.f dummyf.f)
 #  add_executable(mprobef  EXCLUDE_FROM_ALL mprobef.f)
   add_executable(statusesf EXCLUDE_FROM_ALL statusesf.f)
index 9651b8e..ee83d0f 100644 (file)
@@ -17,6 +17,9 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
     add_executable(${test} EXCLUDE_FROM_ALL ${test}.f90)
     add_dependencies(tests ${test})
     target_link_libraries(${test} simgrid mtest_f90)
+    if((CMAKE_Fortran_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9.99"))
+      set_property(SOURCE ${test}.f90 PROPERTY COMPILE_FLAGS -std=legacy)
+    endif()
   endforeach()
 endif()
 
index 3218a78..3576376 100644 (file)
@@ -17,7 +17,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 (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9.99"))
+      set_property(SOURCE ${test}.f90 PROPERTY COMPILE_FLAGS -std=legacy)
+    endif()
   endforeach()
 endif()