diff --git a/Documentation/Examples/CMakeLists.txt b/Documentation/Examples/CMakeLists.txt index ffc14426f790c8c760d77fdc056d782836bc1a94..104a1513d809245230b192bad5006e1fca0c09f4 100644 --- a/Documentation/Examples/CMakeLists.txt +++ b/Documentation/Examples/CMakeLists.txt @@ -22,27 +22,29 @@ target_link_libraries (stack_example SuperStupidStack CORSIKAunits CORSIKAlogging) CORSIKA_ADD_TEST (stack_example) -add_executable (cascade_example cascade_example.cc) -target_compile_options(cascade_example PRIVATE -g) # do not skip asserts -target_link_libraries (cascade_example SuperStupidStack CORSIKAunits - CORSIKAlogging - CORSIKArandom - ProcessSibyll - ProcessPythia - CORSIKAcascade - ProcessEnergyLoss - ProcessStackInspector - ProcessTrackWriter - ProcessTrackingLine - CORSIKAprocesses - CORSIKAcascade - CORSIKAparticles - CORSIKAgeometry - CORSIKAenvironment - CORSIKAprocesssequence - ) -install (TARGETS cascade_example DESTINATION share/examples) -CORSIKA_ADD_TEST (cascade_example) +if (Pythia8_FOUND) + add_executable (cascade_example cascade_example.cc) + target_compile_options(cascade_example PRIVATE -g) # do not skip asserts + target_link_libraries (cascade_example SuperStupidStack CORSIKAunits + CORSIKAlogging + CORSIKArandom + ProcessSibyll + ProcessPythia + CORSIKAcascade + ProcessEnergyLoss + ProcessStackInspector + ProcessTrackWriter + ProcessTrackingLine + CORSIKAprocesses + CORSIKAcascade + CORSIKAparticles + CORSIKAgeometry + CORSIKAenvironment + CORSIKAprocesssequence + ) + install (TARGETS cascade_example DESTINATION share/examples) + CORSIKA_ADD_TEST (cascade_example) +endif() add_executable (boundary_example boundary_example.cc) target_compile_options(boundary_example PRIVATE -g) # do not skip asserts @@ -62,50 +64,54 @@ target_link_libraries (boundary_example SuperStupidStack CORSIKAunits CORSIKAlog install (TARGETS boundary_example DESTINATION share/examples) CORSIKA_ADD_TEST (boundary_example) -add_executable (cascade_proton_example cascade_proton_example.cc) -target_compile_options(cascade_proton_example PRIVATE -g) # do not skip asserts -target_link_libraries (cascade_proton_example SuperStupidStack CORSIKAunits - CORSIKAlogging - CORSIKArandom - ProcessSibyll - ProcessPythia - CORSIKAcascade - ProcessEnergyLoss - ProcessTrackWriter - ProcessTrackingLine - ProcessHadronicElasticModel - CORSIKAprocesses - CORSIKAcascade - CORSIKAparticles - CORSIKAgeometry - CORSIKAenvironment - CORSIKAprocesssequence - ) +if (Pythia8_FOUND) + add_executable (cascade_proton_example cascade_proton_example.cc) + target_compile_options(cascade_proton_example PRIVATE -g) # do not skip asserts + target_link_libraries (cascade_proton_example SuperStupidStack CORSIKAunits + CORSIKAlogging + CORSIKArandom + ProcessSibyll + ProcessPythia + CORSIKAcascade + ProcessEnergyLoss + ProcessTrackWriter + ProcessTrackingLine + ProcessHadronicElasticModel + CORSIKAprocesses + CORSIKAcascade + CORSIKAparticles + CORSIKAgeometry + CORSIKAenvironment + CORSIKAprocesssequence + ) -install (TARGETS cascade_proton_example DESTINATION share/examples) -CORSIKA_ADD_TEST (cascade_proton_example) + install (TARGETS cascade_proton_example DESTINATION share/examples) + CORSIKA_ADD_TEST (cascade_proton_example) +endif() -add_executable (vertical_EAS vertical_EAS.cc) -target_compile_options(vertical_EAS PRIVATE -g) # do not skip asserts -target_link_libraries (vertical_EAS SuperStupidStack CORSIKAunits - CORSIKAlogging - CORSIKArandom - ProcessSibyll - ProcessPythia - CORSIKAcascade - ProcessEnergyLoss - ProcessTrackWriter - ProcessTrackingLine - ProcessHadronicElasticModel - CORSIKAprocesses - CORSIKAcascade - CORSIKAparticles - CORSIKAgeometry - CORSIKAenvironment - CORSIKAprocesssequence - ) -install (TARGETS vertical_EAS DESTINATION share/examples) -# CORSIKA_ADD_TEST (vertical_EAS) not yet... +if (Pythia8_FOUND) + add_executable (vertical_EAS vertical_EAS.cc) + target_compile_options(vertical_EAS PRIVATE -g) # do not skip asserts + target_link_libraries (vertical_EAS SuperStupidStack CORSIKAunits + CORSIKAlogging + CORSIKArandom + ProcessSibyll + ProcessPythia + CORSIKAcascade + ProcessEnergyLoss + ProcessTrackWriter + ProcessTrackingLine + ProcessHadronicElasticModel + CORSIKAprocesses + CORSIKAcascade + CORSIKAparticles + CORSIKAgeometry + CORSIKAenvironment + CORSIKAprocesssequence + ) + install (TARGETS vertical_EAS DESTINATION share/examples) + # CORSIKA_ADD_TEST (vertical_EAS) not yet... +endif() add_executable (staticsequence_example staticsequence_example.cc) target_compile_options(staticsequence_example PRIVATE -g) # do not skip asserts