IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 002769b9 authored by Ralf M Ulrich's avatar Ralf M Ulrich Committed by ralfulrich
Browse files

eigen3 and pythia targets

parent b35f1fa5
No related branches found
No related tags found
No related merge requests found
...@@ -146,11 +146,11 @@ if (WITH_EIGEN3) ...@@ -146,11 +146,11 @@ if (WITH_EIGEN3)
message ("Using eigen3 installed at location ${WITH_EIGEN3}") message ("Using eigen3 installed at location ${WITH_EIGEN3}")
list (APPEND CMAKE_MODULE_PATH "${WITH_EIGEN3}/cmake") list (APPEND CMAKE_MODULE_PATH "${WITH_EIGEN3}/cmake")
# set (EIGEN3_INCLUDE_DIR "${WITH_EIGEN3}" CACHE PATH "eigen3 directory") # set (EIGEN3_INCLUDE_DIR "${WITH_EIGEN3}" CACHE PATH "eigen3 directory")
find_package (Eigen3 REQUIRED) find_package (Eigen3 REQUIRED NO_MODULE)
endif () endif ()
else (WITH_EIGEN3) else (WITH_EIGEN3)
message ("Searching eigen3 installed at system-level") message ("Searching eigen3 installed at system-level")
find_package (Eigen3) # if not found here, will automatically pick ThirdParty version find_package (Eigen3 NO_MODULE) # if not found here, will automatically pick ThirdParty version
endif (WITH_EIGEN3) endif (WITH_EIGEN3)
# some final info output # some final info output
......
...@@ -41,6 +41,7 @@ target_link_libraries ( ...@@ -41,6 +41,7 @@ target_link_libraries (
CORSIKAgeometry CORSIKAgeometry
CORSIKAunits CORSIKAunits
CORSIKAutilities CORSIKAutilities
CORSIKAeigen3
) )
target_include_directories ( target_include_directories (
...@@ -50,11 +51,11 @@ target_include_directories ( ...@@ -50,11 +51,11 @@ target_include_directories (
$<INSTALL_INTERFACE:include/include> $<INSTALL_INTERFACE:include/include>
) )
target_include_directories ( #target_include_directories (
CORSIKAgeometry # CORSIKAgeometry
SYSTEM # SYSTEM
PUBLIC "${EIGEN3_INCLUDE_DIR}" # PUBLIC "${EIGEN3_INCLUDE_DIR}"
) # )
install ( install (
TARGETS CORSIKAgeometry TARGETS CORSIKAgeometry
......
...@@ -54,6 +54,7 @@ target_link_libraries ( ...@@ -54,6 +54,7 @@ target_link_libraries (
CORSIKAgeometry CORSIKAgeometry
CORSIKAunits CORSIKAunits
CORSIKAboost # so far only for MetaProgramming CORSIKAboost # so far only for MetaProgramming
CORSIKAeigen3 # for COMboost
) )
target_include_directories ( target_include_directories (
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include <corsika/units/PhysicalUnits.h> #include <corsika/units/PhysicalUnits.h>
#include <corsika/utl/COMBoost.h> #include <corsika/utl/COMBoost.h>
#include <Eigen/Dense>
#include <iostream> #include <iostream>
using namespace corsika::geometry; using namespace corsika::geometry;
......
...@@ -40,7 +40,7 @@ target_link_libraries ( ...@@ -40,7 +40,7 @@ target_link_libraries (
CORSIKAenvironment CORSIKAenvironment
CORSIKAsetup CORSIKAsetup
CORSIKArandom CORSIKArandom
CORSIKAPythia8 CORSIKApythia8
) )
target_include_directories ( target_include_directories (
......
...@@ -43,28 +43,26 @@ if (NOT Boost_FOUND) ...@@ -43,28 +43,26 @@ if (NOT Boost_FOUND)
set (Boost_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/externals/boost) set (Boost_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/externals/boost)
install (DIRECTORY ${Boost_PREFIX}/ DESTINATION ${Boost_INSTALL_DIR}) install (DIRECTORY ${Boost_PREFIX}/ DESTINATION ${Boost_INSTALL_DIR})
message ("Use ThirdParty boost include dir ${Boost_INCLUDE_DIR}")
set_target_properties ( set_target_properties (
CORSIKAboost PROPERTIES CORSIKAboost PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}> $<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
) )
message ("Use ThirdParty boost include dir ${Boost_INCLUDE_DIR}")
include_directories (${Boost_INCLUDE_DIR})
else (NOT Boost_FOUND) else (NOT Boost_FOUND)
message ("Using system-level boost version ${Boost_VERSION} at ${Boost_INCLUDE_DIR}") message ("Using system-level boost version ${Boost_VERSION} at ${Boost_INCLUDE_DIR}")
set_target_properties ( set_target_properties (
CORSIKAboost PROPERTIES CORSIKAboost PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_LINK_LIBRARIES Boost::headers
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
) )
endif (NOT Boost_FOUND) endif (NOT Boost_FOUND)
# eigen3 # eigen3
add_library (CORSIKAEigen3 INTERFACE IMPORTED GLOBAL) add_library (CORSIKAeigen3 INTERFACE IMPORTED GLOBAL)
if (NOT Eigen3_FOUND) if (NOT Eigen3_FOUND)
set (_C8_Eigen3_VERSION "eigen-eigen-b3f3d4950030") set (_C8_Eigen3_VERSION "eigen-eigen-b3f3d4950030")
...@@ -82,11 +80,11 @@ if (NOT Eigen3_FOUND) ...@@ -82,11 +80,11 @@ if (NOT Eigen3_FOUND)
) )
set (HAVE_Eigen3 1 CACHE BOOL "presence of eigen3, via external-project-add in ThirdParty folder") set (HAVE_Eigen3 1 CACHE BOOL "presence of eigen3, via external-project-add in ThirdParty folder")
set (Eigen3_FOUND 1 PARENT_SCOPE) set (Eigen3_FOUND 1 PARENT_SCOPE)
ExternalProject_Get_Property (boost INSTALL_DIR) ExternalProject_Get_Property (eigen3 INSTALL_DIR)
set (Eigen3_PREFIX ${INSTALL_DIR}/..) set (Eigen3_PREFIX ${INSTALL_DIR}/..)
set (Eigen3_INCLUDE_DIR ${Eigen3_PREFIX}) set (Eigen3_INCLUDE_DIR ${Eigen3_PREFIX})
set (Eigen3_LIBRARY_DIR ${Eigen3_PREFIX}) set (Eigen3_LIBRARY_DIR ${Eigen3_PREFIX})
add_dependencies (CORSIKAboost boost) add_dependencies (CORSIKAeigen3 eigen3)
# create include directory at config time # create include directory at config time
file (MAKE_DIRECTORY ${Eigen3_INCLUDE_DIR}) file (MAKE_DIRECTORY ${Eigen3_INCLUDE_DIR})
...@@ -94,25 +92,26 @@ if (NOT Eigen3_FOUND) ...@@ -94,25 +92,26 @@ if (NOT Eigen3_FOUND)
set (Eigen3_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/externals/eigen3) set (Eigen3_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/externals/eigen3)
install (DIRECTORY ${Eigen3_PREFIX}/ DESTINATION ${Eigen3_INSTALL_DIR}) install (DIRECTORY ${Eigen3_PREFIX}/ DESTINATION ${Eigen3_INSTALL_DIR})
message ("Use ThirdParty eigen3 include dir ${Eigen3_INCLUDE_DIR}")
set_target_properties ( set_target_properties (
CORSIKAEigen3 PROPERTIES CORSIKAeigen3 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${Eigen3_INCLUDE_DIR}> $<BUILD_INTERFACE:${Eigen3_INCLUDE_DIR}>
) )
else (NOT Eigen3_FOUND) else (NOT Eigen3_FOUND)
message ("Using system-level eigen3 version ${Eigen3_VERSION} at ${Eigen3_INCLUDE_DIR}")
set_target_properties ( set_target_properties (
CORSIKAEigen3 PROPERTIES CORSIKAeigen3 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_LINK_LIBRARIES Eigen3::Eigen
$<BUILD_INTERFACE:${Eigen3_INCLUDE_DIR}> )
)
endif (NOT Eigen3_FOUND) endif (NOT Eigen3_FOUND)
# Pythia8 # Pythia8
add_library (CORSIKAPythia8 STATIC IMPORTED GLOBAL) add_library (CORSIKApythia8 STATIC IMPORTED GLOBAL)
if (NOT Pythia8_FOUND) if (NOT Pythia8_FOUND)
set (_C8_Pythia8_VERSION "8235") set (_C8_Pythia8_VERSION "8235")
message ("Building ThirdParty/pythia8 using pythia${_C8_Pythia8_VERSION}-stripped.tar.bz2") message ("Building ThirdParty/pythia8 using pythia${_C8_Pythia8_VERSION}-stripped.tar.bz2")
...@@ -133,7 +132,7 @@ if (NOT Pythia8_FOUND) ...@@ -133,7 +132,7 @@ if (NOT Pythia8_FOUND)
set (Pythia8_PREFIX ${INSTALL_DIR}) set (Pythia8_PREFIX ${INSTALL_DIR})
set (Pythia8_INCLUDE_DIR ${Pythia8_PREFIX}/include) set (Pythia8_INCLUDE_DIR ${Pythia8_PREFIX}/include)
set (Pythia8_LIBRARY ${Pythia8_PREFIX}/lib/libpythia8.a) set (Pythia8_LIBRARY ${Pythia8_PREFIX}/lib/libpythia8.a)
add_dependencies (CORSIKAPythia8 pythia8) add_dependencies (CORSIKApythia8 pythia8)
# create include directory at config time # create include directory at config time
file (MAKE_DIRECTORY ${Pythia8_INCLUDE_DIR}) file (MAKE_DIRECTORY ${Pythia8_INCLUDE_DIR})
...@@ -142,7 +141,7 @@ if (NOT Pythia8_FOUND) ...@@ -142,7 +141,7 @@ if (NOT Pythia8_FOUND)
install (DIRECTORY ${INSTALL_DIR}/ DESTINATION ${Pythia8_INSTALL_DIR}) install (DIRECTORY ${INSTALL_DIR}/ DESTINATION ${Pythia8_INSTALL_DIR})
set_target_properties ( set_target_properties (
CORSIKAPythia8 PROPERTIES CORSIKApythia8 PROPERTIES
IMPORTED_LOCATION ${Pythia8_LIBRARY} IMPORTED_LOCATION ${Pythia8_LIBRARY}
IMPORTED_LINK_INTERFACE_LIBRARIES dl IMPORTED_LINK_INTERFACE_LIBRARIES dl
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES
...@@ -153,7 +152,7 @@ else (NOT Pythia8_FOUND) ...@@ -153,7 +152,7 @@ else (NOT Pythia8_FOUND)
message ("Using system-level Pythia8 version ${Pythia8_VERSION} at ${Pythia8_INCLUDE_DIR}") message ("Using system-level Pythia8 version ${Pythia8_VERSION} at ${Pythia8_INCLUDE_DIR}")
set_target_properties ( set_target_properties (
CORSIKAPythia8 PROPERTIES CORSIKApythia8 PROPERTIES
IMPORTED_LOCATION ${Pythia8_LIBRARY} IMPORTED_LOCATION ${Pythia8_LIBRARY}
IMPORTED_LINK_INTERFACE_LIBRARIES dl IMPORTED_LINK_INTERFACE_LIBRARIES dl
INTERFACE_INCLUDE_DIRECTORIES ${Pythia8_INCLUDE_DIR} INTERFACE_INCLUDE_DIRECTORIES ${Pythia8_INCLUDE_DIR}
......
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