diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 23694b08955afac3316f7491769ff96209738acf..ae67a0d5b6aa481987399d98b28a0af4c9a4fac2 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -9,19 +9,6 @@ find_package (corsika CONFIG REQUIRED) # this is only for CORSIKA_REGISTER_EXAMPLE include ("${CMAKE_CURRENT_SOURCE_DIR}/corsikaExamples.cmake") -find_package(Catch2) -find_package(yaml-cpp) -find_package(CLI11) -find_package(Arrow) -find_package(PROPOSAL) -find_package(Boost) -find_package(ZLIB) -find_package(BZip2) -find_package(Eigen3) -find_package(spdlog) - -set(CONANDEPS Catch2::Catch2WithMain yaml-cpp::yaml-cpp CLI11::CLI11 arrow::arrow PROPOSAL::PROPOSAL boost::boost ZLIB::ZLIB BZip2::BZip2 Eigen3::Eigen spdlog::spdlog ) - # Put binaries in bin directory set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) @@ -30,28 +17,28 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) ################### add_executable (em_shower cascade_examples/em_shower.cpp) -target_link_libraries (em_shower CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (em_shower PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (em_shower RUN_OPTIONS 100 8472) if (WITH_FLUKA) add_executable (mars cascade_examples/mars.cpp) - target_link_libraries (mars CORSIKA8::CORSIKA8 ${CONANDEPS}) + target_link_libraries (mars PRIVATE CORSIKA8::CORSIKA8) message("FLUKA found, will make 'mars' example") else() message("FLUKA not found, will not make 'mars' example") endif() add_executable (mc_conex cascade_examples/mc_conex.cpp) -target_link_libraries (mc_conex CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (mc_conex PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (mc_conex RUN_OPTIONS 4 2 10000.) add_executable (radio_em_shower cascade_examples/radio_em_shower.cpp) -target_link_libraries (radio_em_shower CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (radio_em_shower PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (radio_em_shower RUN_OPTIONS 10 1121673489) if (WITH_FLUKA) add_executable (water cascade_examples/water.cpp) - target_link_libraries (water CORSIKA8::CORSIKA8 ${CONANDEPS}) + target_link_libraries (water PRIVATE CORSIKA8::CORSIKA8) message("FLUKA found, will make 'water' example") else() message("FLUKA not found, will not make 'water' example") @@ -63,30 +50,30 @@ endif() ##################### add_executable (boundary_crossing framework_examples/boundary_crossing.cpp) -target_link_libraries (boundary_crossing CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (boundary_crossing PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (boundary_crossing) add_executable (environment framework_examples/environment.cpp) -target_link_libraries (environment CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (environment PRIVATE CORSIKA8::CORSIKA8) add_executable (geometry framework_examples/geometry.cpp) -target_link_libraries (geometry CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (geometry PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (geometry) add_executable (helix_trajectory framework_examples/helix_trajectory.cpp) -target_link_libraries (helix_trajectory CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (helix_trajectory PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (helix_trajectory) add_executable (known_particles framework_examples/known_particles.cpp) -target_link_libraries (known_particles CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (known_particles PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (known_particles) add_executable (stack framework_examples/stack.cpp) -target_link_libraries (stack CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (stack PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (stack) add_executable (static_sequence framework_examples/static_sequence.cpp) -target_link_libraries (static_sequence CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (static_sequence PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (static_sequence) @@ -95,17 +82,17 @@ CORSIKA_REGISTER_EXAMPLE (static_sequence) ################### add_executable (stopping_power physics_examples/stopping_power.cpp) -target_link_libraries (stopping_power CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (stopping_power PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (stopping_power) add_executable (synchrotron_clover_leaf physics_examples/synchrotron_clover_leaf.cpp) -target_link_libraries (synchrotron_clover_leaf CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (synchrotron_clover_leaf PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (synchrotron_clover_leaf) add_executable (synchrotron_test_C8tracking physics_examples/synchrotron_test_C8tracking.cpp) -target_link_libraries (synchrotron_test_C8tracking CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (synchrotron_test_C8tracking PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (synchrotron_test_C8tracking) add_executable (synchrotron_test_manual_tracking physics_examples/synchrotron_test_manual_tracking.cpp) -target_link_libraries (synchrotron_test_manual_tracking CORSIKA8::CORSIKA8 ${CONANDEPS}) +target_link_libraries (synchrotron_test_manual_tracking PRIVATE CORSIKA8::CORSIKA8) CORSIKA_REGISTER_EXAMPLE (synchrotron_test_manual_tracking)