IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pranav Sampathkumar
corsika
Commits
dddfcaa4
Commit
dddfcaa4
authored
5 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
use WITH_EIGEN3 as Lukas suggested
parent
897a2ac2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+17
-12
17 additions, 12 deletions
CMakeLists.txt
Framework/Geometry/CMakeLists.txt
+1
-1
1 addition, 1 deletion
Framework/Geometry/CMakeLists.txt
ThirdParty/CMakeLists.txt
+13
-8
13 additions, 8 deletions
ThirdParty/CMakeLists.txt
with
31 additions
and
21 deletions
CMakeLists.txt
+
17
−
12
View file @
dddfcaa4
...
...
@@ -121,14 +121,6 @@ if (WITH_PYTHIA)
find_package
(
Pythia8
)
# optional
endif
(
WITH_PYTHIA
)
# check if system level eigen3 is present
find_package
(
Eigen3 QUIET
)
if
(
NOT Eigen3_FOUND
)
# ...no -> use our own header only version
set
(
THIRDPARTY_Eigen3
"yes"
)
message
(
"use ThirdParty/eigen3"
)
endif
(
NOT Eigen3_FOUND
)
# order of subdirectories
add_subdirectory
(
ThirdParty
)
add_subdirectory
(
Framework
)
...
...
@@ -143,11 +135,24 @@ if (WITH_COAST)
add_subdirectory
(
COAST
)
endif
()
# now check if Eigen3 was previsouly found, or need to be checked again
if
(
THIRDPARTY_Eigen3
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
EIGEN3_INCLUDE_DIR
}
/cmake"
)
# 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
)
else
()
list
(
APPEND CMAKE_MODULE_PATH
"
${
WITH_EIGEN3
}
/cmake"
)
set
(
EIGEN3_INCLUDE_DIR
"
${
WITH_EIGEN3
}
"
CACHE PATH
"eigen3 directory"
)
find_package
(
Eigen3 REQUIRED
)
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
)
endif
(
THIRDPARTY_Eigen
3
)
endif
(
WITH_EIGEN
3
)
# some final info output
message
(
"Use eigen3 version:
${
EIGEN3_VERSION
}
from
${
EIGEN3_INCLUDE_DIR
}
"
)
include
(
FeatureSummary
)
feature_summary
(
WHAT ALL
)
This diff is collapsed.
Click to expand it.
Framework/Geometry/CMakeLists.txt
+
1
−
1
View file @
dddfcaa4
...
...
@@ -46,7 +46,7 @@ target_link_libraries (
target_include_directories
(
CORSIKAgeometry
SYSTEM
PUBLIC
${
EIGEN3_INCLUDE_DIR
}
PUBLIC
${
EIGEN3_INCLUDE_DIR
}
)
target_include_directories
(
...
...
This diff is collapsed.
Click to expand it.
ThirdParty/CMakeLists.txt
+
13
−
8
View file @
dddfcaa4
...
...
@@ -11,11 +11,16 @@ install (DIRECTORY phys DESTINATION include/ThirdParty/)
install
(
DIRECTORY catch2 DESTINATION include/ThirdParty/
)
install
(
DIRECTORY boost DESTINATION include/ThirdParty/boost/
)
if
(
THIRDPARTY_Eigen3
)
set
(
LOCAL_Eigen3_VERSION
"eigen-eigen-b3f3d4950030"
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E tar xjf
${
LOCAL_Eigen3_VERSION
}
.tar.bz2
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
EIGEN3_INCLUDE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
LOCAL_Eigen3_VERSION
}
"
PARENT_SCOPE
)
endif
(
THIRDPARTY_Eigen3
)
if
(
NOT WITH_EIGEN3
)
set
(
_LOCAL_Eigen3_VERSION
"eigen-eigen-b3f3d4950030"
)
if
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
_LOCAL_Eigen3_VERSION
}
.tar.bz2"
IS_NEWER_THAN
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
_LOCAL_Eigen3_VERSION
}
"
)
message
(
"Unpacking ThirdParty/eigen3"
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E tar xjf
${
_LOCAL_Eigen3_VERSION
}
.tar.bz2
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
endif
()
set
(
LOCAL_Eigen3_VERSION
${
CMAKE_CURRENT_SOURCE_DIR
}
/eigen-eigen-b3f3d4950030 PARENT_SCOPE
)
endif
(
NOT WITH_EIGEN3
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment