diff --git a/CMakeModules/CorsikaUtilities.cmake b/CMakeModules/CorsikaUtilities.cmake index 62800d9070f212ade4e13d93f41c47a25c1d2434..d80269b3a24e549a7655b769099bd6579a79a112 100644 --- a/CMakeModules/CorsikaUtilities.cmake +++ b/CMakeModules/CorsikaUtilities.cmake @@ -180,7 +180,7 @@ endfunction (CORSIKA_ADD_TEST) # target_link_libraries(testSomething ...) and so on. # function (CORSIKA_ADD_EXAMPLE) - cmake_parse_arguments (PARSE_ARGV 1 C8_ADD_EXAMPLE "" "RUN_OPTIONS" "SOURCES") + cmake_parse_arguments (PARSE_ARGV 1 C8_ADD_EXAMPLE "" "" "SOURCES;RUN_OPTIONS") set (name ${ARGV0}) if (NOT C8_ADD_EXAMPLE_SOURCES) @@ -207,9 +207,9 @@ function (CORSIKA_ADD_EXAMPLE) add_custom_command (TARGET run_examples POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo "" - COMMAND ${CMAKE_COMMAND} -E echo "***************************************" - COMMAND ${CMAKE_COMMAND} -E echo "***** running example: ${name} ${run_options}" - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name} ${run_options} + COMMAND ${CMAKE_COMMAND} -E echo "**************************************" + COMMAND ${CMAKE_COMMAND} -E echo "***** running example: ${name} " ${run_options} VERBATIM + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name} ${run_options} VERBATIM WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/example_outputs) install (TARGETS ${name} DESTINATION share/examples) endfunction (CORSIKA_ADD_EXAMPLE) diff --git a/Documentation/Examples/CMakeLists.txt b/Documentation/Examples/CMakeLists.txt index b1c2b87de7eccc1d7a50cb6c8210ab1f506ae6bf..ee95e2e89956ec8ca79ce7b90f890a166aa7bb69 100644 --- a/Documentation/Examples/CMakeLists.txt +++ b/Documentation/Examples/CMakeLists.txt @@ -1,11 +1,11 @@ -CORSIKA_ADD_EXAMPLE (helix_example SOURCES helix_example.cc) +CORSIKA_ADD_EXAMPLE (helix_example) target_link_libraries (helix_example CORSIKAgeometry CORSIKAunits) -CORSIKA_ADD_EXAMPLE (particle_list_example RUN_OPTIONS aha) +CORSIKA_ADD_EXAMPLE (particle_list_example) target_link_libraries (particle_list_example CORSIKAparticles CORSIKAunits CORSIKAprocesses ProcessSibyll ProcessQGSJetII) -CORSIKA_ADD_EXAMPLE (geometry_example SOURCES geometry_example.cc RUN_OPTIONS test) +CORSIKA_ADD_EXAMPLE (geometry_example) target_link_libraries (geometry_example CORSIKAgeometry CORSIKAunits) CORSIKA_ADD_EXAMPLE (logger_example) @@ -82,7 +82,7 @@ if (Pythia8_FOUND) CORSIKAprocesssequence ) - CORSIKA_ADD_EXAMPLE (vertical_EAS RUN_OPTIONS "4 2 10000.") + CORSIKA_ADD_EXAMPLE (vertical_EAS RUN_OPTIONS 4 2 10000.) target_link_libraries (vertical_EAS SuperStupidStack CORSIKAunits