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
acd163db
Commit
acd163db
authored
4 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
use FindZLIB to build cnpy and dependencies
parent
1166a88e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Framework/Utilities/CMakeLists.txt
+28
-12
28 additions, 12 deletions
Framework/Utilities/CMakeLists.txt
ThirdParty/CMakeLists.txt
+11
-2
11 additions, 2 deletions
ThirdParty/CMakeLists.txt
ThirdParty/cnpy/CMakeLists.txt
+2
-17
2 additions, 17 deletions
ThirdParty/cnpy/CMakeLists.txt
with
41 additions
and
31 deletions
Framework/Utilities/CMakeLists.txt
+
28
−
12
View file @
acd163db
...
@@ -31,9 +31,27 @@ set (
...
@@ -31,9 +31,27 @@ set (
sgn.h
sgn.h
CorsikaFenv.h
CorsikaFenv.h
MetaProgramming.h
MetaProgramming.h
SaveBoostHistogram.hpp
)
)
set
(
UTILITIES_DEPENDS
CORSIKAgeometry
CORSIKAunits
C8::ext::boost
# so far only for MetaProgramming
C8::ext::eigen3
# for COMboost
)
if
(
TARGET cnpy
)
LIST
(
APPEND
UTILITIES_HEADERS
SaveBoostHistogram.hpp
)
LIST
(
APPEND
UTILITIES_DEPENDS
cnpy
# for SaveBoostHistogram
)
endif
(
TARGET cnpy
)
set
(
set
(
UTILITIES_NAMESPACE
UTILITIES_NAMESPACE
corsika/utl
corsika/utl
...
@@ -53,11 +71,7 @@ set_target_properties (
...
@@ -53,11 +71,7 @@ set_target_properties (
# target dependencies on other libraries (also the header onlys)
# target dependencies on other libraries (also the header onlys)
target_link_libraries
(
target_link_libraries
(
CORSIKAutilities
CORSIKAutilities
CORSIKAgeometry
${
UTILITIES_DEPENDS
}
CORSIKAunits
C8::ext::boost
# so far only for MetaProgramming
C8::ext::eigen3
# for COMboost
cnpy
# for SaveBoostHistogram
)
)
target_include_directories
(
target_include_directories
(
...
@@ -91,9 +105,11 @@ target_link_libraries (
...
@@ -91,9 +105,11 @@ target_link_libraries (
CORSIKAtesting
CORSIKAtesting
)
)
CORSIKA_ADD_TEST
(
testSaveBoostHistogram
)
if
(
TARGET cnpy
)
target_link_libraries
(
CORSIKA_ADD_TEST
(
testSaveBoostHistogram
)
testSaveBoostHistogram
target_link_libraries
(
CORSIKAutilities
testSaveBoostHistogram
CORSIKAtesting
CORSIKAutilities
)
CORSIKAtesting
)
endif
(
TARGET cnpy
)
This diff is collapsed.
Click to expand it.
ThirdParty/CMakeLists.txt
+
11
−
2
View file @
acd163db
...
@@ -35,7 +35,7 @@ message (STATUS "USE_BOOST_C8='${USE_BOOST_C8}'")
...
@@ -35,7 +35,7 @@ message (STATUS "USE_BOOST_C8='${USE_BOOST_C8}'")
add_library
(
C8::ext::boost INTERFACE IMPORTED GLOBAL
)
add_library
(
C8::ext::boost INTERFACE IMPORTED GLOBAL
)
if
(
"x_
${
USE_BOOST_C8
}
"
STREQUAL
"x_SYSTEM"
)
if
(
"x_
${
USE_BOOST_C8
}
"
STREQUAL
"x_SYSTEM"
)
find_package
(
Boost REQUIRED mp11 iterator core format interval optional type_index histogram
)
find_package
(
Boost REQUIRED
COMPONENTS
mp11 iterator core format interval optional type_index histogram
)
message
(
STATUS
"Using system-level boost version
${
Boost_VERSION
}
at
${
Boost_INCLUDE_DIR
}
"
)
message
(
STATUS
"Using system-level boost version
${
Boost_VERSION
}
at
${
Boost_INCLUDE_DIR
}
"
)
set_target_properties
(
set_target_properties
(
...
@@ -300,4 +300,13 @@ else (Boost_IOSTREAMS_FOUND)
...
@@ -300,4 +300,13 @@ else (Boost_IOSTREAMS_FOUND)
)
)
endif
(
Boost_IOSTREAMS_FOUND
)
endif
(
Boost_IOSTREAMS_FOUND
)
add_subdirectory
(
cnpy
)
# libz needed for cnpy, used for SaveHistograms
find_package
(
ZLIB QUIET
)
if
(
ZLIB_FOUND
)
message
(
STATUS
"Found ZLIB. Build cnpy for SaveHistograms"
)
add_subdirectory
(
cnpy
)
else
(
ZLIB_FOUND
)
message
(
WARNING
"Did not find ZLIB. Cannot build cnpy for SaveHistograms"
)
endif
(
ZLIB_FOUND
)
This diff is collapsed.
Click to expand it.
ThirdParty/cnpy/CMakeLists.txt
+
2
−
17
View file @
acd163db
...
@@ -21,15 +21,13 @@ set_target_properties (
...
@@ -21,15 +21,13 @@ set_target_properties (
PROPERTIES
PROPERTIES
VERSION
${
PROJECT_VERSION
}
VERSION
${
PROJECT_VERSION
}
SOVERSION 1
SOVERSION 1
# PUBLIC_HEADER "${MODEL_HEADERS}"
)
)
find_package
(
ZLIB
)
# target dependencies on other libraries (also the header onlys)
# target dependencies on other libraries (also the header onlys)
target_link_libraries
(
target_link_libraries
(
cnpy
cnpy
${
ZLIB_LIBRARIES
}
PUBLIC
ZLIB::ZLIB
)
)
target_include_directories
(
target_include_directories
(
...
@@ -43,18 +41,5 @@ install (
...
@@ -43,18 +41,5 @@ install (
TARGETS cnpy
TARGETS cnpy
LIBRARY DESTINATION lib
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
ARCHIVE DESTINATION lib
# PUBLIC_HEADER DESTINATION include/${MODEL_NAMESPACE}
)
)
# --------------------
# code unit testing
# CORSIKA_ADD_TEST(testNullModel)
#target_link_libraries (
# testNullModel ProcessNullModel
# CORSIKAsetup
# CORSIKAgeometry
# CORSIKAunits
# CORSIKAthirdparty # for catch2
# )
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