Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
same thing elsewhere
[simgrid.git] / teshsuite / smpi / mpich3-test / f90 / datatype / CMakeLists.txt
index 5b2f44a0cd34c71f598cf0db54b1a97ee4c0d34b..cd4cd733f046d6c8a9241de963094e273a97de11 100644 (file)
@@ -8,16 +8,19 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
-  foreach(test gaddressf90
+  foreach(test gaddressf90 typesnamef90 structf 
              # allctypesf90 createf90 get_elem_d get_elem_u
-            # hindex1f90 hindexed_blockf90 
+              hindex1f90
               indtype kinds
-            # packef90 sizeof structf trf90 typecntsf90 typem2f90 typename3f90
-            # typenamef90 typesnamef90
+            # packef90 sizeof  trf90 typecntsf90 typem2f90 typename3f90
+            # typenamef90 hindexed_blockf90
               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()