Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix cmake 3.20 warning.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 4 May 2021 14:20:37 +0000 (16:20 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 4 May 2021 14:46:44 +0000 (16:46 +0200)
Policy CMP0115 is not set: Source file extensions must be explicit.

examples/smpi/CMakeLists.txt

index 332f14f..7b5d64c 100644 (file)
@@ -5,8 +5,14 @@ if(enable_smpi)
 
   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mc/")
 
-  foreach(x replay ampi_test trace trace_simple trace_call_location energy gemm simple-execute)
-    add_executable       (smpi_${x} EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x})
+  foreach(x replay ampi_test)
+    add_executable       (smpi_${x} EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
+    target_link_libraries(smpi_${x} simgrid)
+    set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
+    add_dependencies(tests smpi_${x})
+  endforeach()
+  foreach(x trace trace_simple trace_call_location energy gemm simple-execute)
+    add_executable       (smpi_${x} EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
     target_link_libraries(smpi_${x} simgrid)
     set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
     add_dependencies(tests smpi_${x})