From eedf2eb72bed8362f177c4cda8ecade438b7279f Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Tue, 5 Jun 2018 15:16:31 +0200 Subject: [PATCH] [CMAKE] SMPI: Merge commands for .c/.cpp files --- examples/smpi/CMakeLists.txt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/smpi/CMakeLists.txt b/examples/smpi/CMakeLists.txt index e6bd3c5c1c..7fea2c9dfa 100644 --- a/examples/smpi/CMakeLists.txt +++ b/examples/smpi/CMakeLists.txt @@ -5,16 +5,12 @@ if(enable_smpi) file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mc/") - foreach(x replay) - add_executable (smpi_${x} ${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}) - endforeach() - - foreach(x trace trace_simple trace_call_location energy) - add_executable (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c) + foreach(x replay + trace trace_simple trace_call_location energy) + add_executable (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}) target_link_libraries(smpi_${x} simgrid) set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) + set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}) endforeach() set_target_properties(smpi_trace_call_location PROPERTIES COMPILE_FLAGS "-trace-call-location") -- 2.20.1