diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ab53f79a493bf21105d41615ac99286c20baa9e..234cc565d493e70562f3ad9df6cd4c01689f15f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,38 +121,46 @@ if (WITH_PYTHIA) find_package (Pythia8) # optional endif (WITH_PYTHIA) -# order of subdirectories +# include potential ThirdParty code provided with CORSIKA add_subdirectory (ThirdParty) -add_subdirectory (Framework) -add_subdirectory (Environment) -add_subdirectory (Stack) -add_subdirectory (Setup) -add_subdirectory (Processes) -add_subdirectory (Documentation) -add_subdirectory (Main) -add_subdirectory (Tools) -if (WITH_COAST) - add_subdirectory (COAST) -endif () # check for Eigen3: either use ThirdParty/eigen3 or system-level installation if (WITH_EIGEN3) string (TOLOWER ${WITH_EIGEN3} WITH_EIGEN3_LOWER) if (WITH_EIGEN3_LOWER EQUAL "system") find_package (Eigen3 REQUIRED) + message ("opt1") else () list (APPEND CMAKE_MODULE_PATH "${WITH_EIGEN3}/cmake") set (EIGEN3_INCLUDE_DIR "${WITH_EIGEN3}" CACHE PATH "eigen3 directory") find_package (Eigen3 REQUIRED) + message ("opt2") endif () else (WITH_EIGEN3) list (APPEND CMAKE_MODULE_PATH "${LOCAL_Eigen3_VERSION}/cmake") set (EIGEN3_INCLUDE_DIR "${LOCAL_Eigen3_VERSION}" CACHE PATH "eigen3 directory") find_package (Eigen3 REQUIRED) + message ("op3") endif (WITH_EIGEN3) # some final info output message ("Use eigen3 version: ${EIGEN3_VERSION} from ${EIGEN3_INCLUDE_DIR}") + +# order of subdirectories +add_subdirectory (Framework) +add_subdirectory (Environment) +add_subdirectory (Stack) +add_subdirectory (Setup) +add_subdirectory (Processes) +add_subdirectory (Documentation) +add_subdirectory (Main) +add_subdirectory (Tools) +if (WITH_COAST) + add_subdirectory (COAST) +endif () + + +# final summary output include (FeatureSummary) feature_summary (WHAT ALL) diff --git a/Framework/Geometry/CMakeLists.txt b/Framework/Geometry/CMakeLists.txt index 39d4fb9844230b0aec94dcc207caadc285dc5b20..252e64e681ee9f61acef026f9f472a066da225e3 100644 --- a/Framework/Geometry/CMakeLists.txt +++ b/Framework/Geometry/CMakeLists.txt @@ -45,15 +45,15 @@ target_link_libraries ( target_include_directories ( CORSIKAgeometry - SYSTEM - PUBLIC ${EIGEN3_INCLUDE_DIR} + INTERFACE + $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> + $<INSTALL_INTERFACE:include/include> ) target_include_directories ( CORSIKAgeometry - INTERFACE - $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> - $<INSTALL_INTERFACE:include/include> + SYSTEM + PUBLIC "${EIGEN3_INCLUDE_DIR}" ) install ( diff --git a/README.md b/README.md index d5cf8f7c2764daf2fe25f5c861502318a7ea4026..b42c3a04bc829434964aeb0c52faaac411e9647a 100644 --- a/README.md +++ b/README.md @@ -58,16 +58,18 @@ which are very useful also for us. CORSIKA 8 is tested regularly at least on gcc7.3.0 and clang-6.0.0. Additional software prerequisites: eigen3, boost, cmake, g++, git. +However, eigen3 is shipped in ThirdParty directory, so any installation +on the system is optional. On a bare Ubuntu 18.04, just add: ``` -sudo apt install libeigen3-dev cmake g++ git +sudo apt install cmake g++ git ``` +add ```libeigen3-dev``` if you want to use system version of eigen3. Follow these steps to download and install CORSIKA 8 milestone2 ``` git clone git@gitlab.ikp.kit.edu:AirShowerPhysics/corsika.git cd corsika -git checkout milestone2 mkdir ../corsika-build cd ../corsika-build cmake ../corsika -DCMAKE_INSTALL_PREFIX=../corsika-install