From 8c33b8fdca980c5286b9f6799dea7befe2769af8 Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Fri, 17 May 2019 23:02:59 +0200
Subject: [PATCH] fix pythia8 dependencies

---
 Documentation/Examples/CMakeLists.txt     | 89 +++++++++++------------
 Documentation/Examples/cascade_example.cc |  3 -
 Documentation/Examples/vertical_EAS.cc    |  4 -
 3 files changed, 42 insertions(+), 54 deletions(-)

diff --git a/Documentation/Examples/CMakeLists.txt b/Documentation/Examples/CMakeLists.txt
index 104a1513d..a3978ae9e 100644
--- a/Documentation/Examples/CMakeLists.txt
+++ b/Documentation/Examples/CMakeLists.txt
@@ -22,29 +22,26 @@ target_link_libraries (stack_example SuperStupidStack CORSIKAunits
   CORSIKAlogging)
 CORSIKA_ADD_TEST (stack_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 (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
+  CORSIKAcascade
+  ProcessEnergyLoss
+  ProcessStackInspector
+  ProcessTrackWriter
+  ProcessTrackingLine
+  CORSIKAprocesses
+  CORSIKAcascade
+  CORSIKAparticles
+  CORSIKAgeometry
+  CORSIKAenvironment
+  CORSIKAprocesssequence
+  )
+install (TARGETS cascade_example DESTINATION share/examples)
+CORSIKA_ADD_TEST (cascade_example)
 
 add_executable (boundary_example boundary_example.cc)
 target_compile_options(boundary_example PRIVATE -g) # do not skip asserts
@@ -60,7 +57,6 @@ target_link_libraries (boundary_example SuperStupidStack CORSIKAunits CORSIKAlog
   CORSIKAenvironment
   CORSIKAprocesssequence
   )
-
 install (TARGETS boundary_example DESTINATION share/examples)
 CORSIKA_ADD_TEST (boundary_example)
 
@@ -77,6 +73,7 @@ if (Pythia8_FOUND)
     ProcessTrackWriter
     ProcessTrackingLine
     ProcessHadronicElasticModel
+    ProcessStackInspector
     CORSIKAprocesses
     CORSIKAcascade
     CORSIKAparticles
@@ -89,29 +86,27 @@ if (Pythia8_FOUND)
   CORSIKA_ADD_TEST (cascade_proton_example)
 endif()
 
-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 (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
+  CORSIKAcascade
+  ProcessEnergyLoss
+  ProcessTrackWriter
+  ProcessTrackingLine
+  ProcessHadronicElasticModel
+  ProcessStackInspector
+  CORSIKAprocesses
+  CORSIKAcascade
+  CORSIKAparticles
+  CORSIKAgeometry
+  CORSIKAenvironment
+  CORSIKAprocesssequence
+  )
+install (TARGETS vertical_EAS DESTINATION share/examples)
+# CORSIKA_ADD_TEST (vertical_EAS) not yet...
 
 add_executable (staticsequence_example staticsequence_example.cc)
 target_compile_options(staticsequence_example PRIVATE -g) # do not skip asserts
diff --git a/Documentation/Examples/cascade_example.cc b/Documentation/Examples/cascade_example.cc
index 2ef7cdcf0..a26f1af68 100644
--- a/Documentation/Examples/cascade_example.cc
+++ b/Documentation/Examples/cascade_example.cc
@@ -29,8 +29,6 @@
 #include <corsika/process/sibyll/Interaction.h>
 #include <corsika/process/sibyll/NuclearInteraction.h>
 
-#include <corsika/process/pythia/Decay.h>
-
 #include <corsika/process/track_writer/TrackWriter.h>
 
 #include <corsika/units/PhysicalUnits.h>
@@ -256,7 +254,6 @@ int main() {
       particles::Code::KMinus, particles::Code::K0Long,  particles::Code::K0Short};
 
   random::RNGManager::GetInstance().RegisterRandomStream("s_rndm");
-  random::RNGManager::GetInstance().RegisterRandomStream("pythia");
   process::sibyll::Interaction sibyll;
   process::sibyll::NuclearInteraction sibyllNuc(sibyll, env);
   process::sibyll::Decay decay(trackedHadrons);
diff --git a/Documentation/Examples/vertical_EAS.cc b/Documentation/Examples/vertical_EAS.cc
index d029a35cf..00f38d8b5 100644
--- a/Documentation/Examples/vertical_EAS.cc
+++ b/Documentation/Examples/vertical_EAS.cc
@@ -28,8 +28,6 @@
 #include <corsika/process/sibyll/Interaction.h>
 #include <corsika/process/sibyll/NuclearInteraction.h>
 
-#include <corsika/process/pythia/Decay.h>
-
 #include <corsika/process/track_writer/TrackWriter.h>
 
 #include <corsika/units/PhysicalUnits.h>
@@ -252,8 +250,6 @@ int main() {
   process::sibyll::Interaction sibyll;
   process::sibyll::NuclearInteraction sibyllNuc(sibyll, env);
   process::sibyll::Decay decay(trackedHadrons);
-  // random::RNGManager::GetInstance().RegisterRandomStream("pythia");
-  // process::pythia::Decay decay(trackedHadrons);
   ProcessCut cut(20_GeV);
 
   // random::RNGManager::GetInstance().RegisterRandomStream("HadronicElasticModel");
-- 
GitLab