IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 20f26a72 authored by Ralf Ulrich's avatar Ralf Ulrich
Browse files

Merge branch 'cmake_twice' into 'master'

Cmake twice

See merge request AirShowerPhysics/corsika!150
parents efe7693d 6cb5f8e1
No related branches found
No related tags found
1 merge request!150Cmake twice
Pipeline #878 passed
......@@ -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)
......@@ -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 (
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment