IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Air Shower Physics
corsika-data
Commits
afe83dc1
Commit
afe83dc1
authored
4 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
added test main
parent
1d12f8ce
No related branches found
No related tags found
No related merge requests found
Pipeline
#3157
failed
4 years ago
Stage: testing
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+22
-7
22 additions, 7 deletions
CMakeLists.txt
readLib/CMakeLists.txt
+4
-0
4 additions, 0 deletions
readLib/CMakeLists.txt
with
26 additions
and
7 deletions
CMakeLists.txt
+
22
−
7
View file @
afe83dc1
#################################
# Distribution of partly compressed data tables+files for air shower physics
# Distribution of partly compressed data tables+files for air shower physics
# Ralf Ulrich, 2020
#
#################################
# This CMakeLists.txt may be included in your project
# to access corsika-data by adding
# add_subdirectory (corsika_data)
# to your CMakeLists.txt
# it creates the cmake taget "CorsikaData"
# and it builds the libCorsikaData.a archive.
#
##################################
# for standalong running
#
cmake_minimum_required
(
VERSION 3.9
)
cmake_minimum_required
(
VERSION 3.9
)
project
(
CorsikaData
)
project
(
CorsikaData
)
###################################
# set useful varialbles upstream
#
get_directory_property
(
hasParent PARENT_DIRECTORY
)
get_directory_property
(
hasParent PARENT_DIRECTORY
)
if
(
hasParent
)
if
(
hasParent
)
set
(
CorsikaData_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
PARENT_SCOPE
)
set
(
CorsikaData_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
PARENT_SCOPE
)
set
(
CorsikaData_VERSION
"1.1.0"
PARENT_SCOPE
)
set
(
CorsikaData_VERSION
"1.1.0"
PARENT_SCOPE
)
endif
(
hasParent
)
endif
(
hasParent
)
###################################
# CorsikaData requires to run with conan, typically inside CORSIKA8
#
if
(
NOT TARGET CONAN_PKG::bzip2
)
if
(
NOT TARGET CONAN_PKG::bzip2
)
message
(
FATAL_ERROR
"Please configure with conan bzip2 package"
)
message
(
FATAL_ERROR
"Please configure with conan bzip2 package"
)
endif
(
NOT TARGET CONAN_PKG::bzip2
)
endif
(
NOT TARGET CONAN_PKG::bzip2
)
#
if
(
NOT TARGET CONAN_PKG::catch2
)
if
(
NOT TARGET CONAN_PKG::catch2
)
message
(
FATAL_ERROR
"Please configure with conan catch2 package"
)
message
(
FATAL_ERROR
"Please configure with conan catch2 package"
)
endif
(
NOT TARGET CONAN_PKG::catch2
)
endif
(
NOT TARGET CONAN_PKG::catch2
)
...
@@ -24,10 +45,4 @@ else (${CMAKE_VERSION} VERSION_LESS "3.12.0")
...
@@ -24,10 +45,4 @@ else (${CMAKE_VERSION} VERSION_LESS "3.12.0")
set
(
CTEST_OUTPUT_ON_FAILURE 1
)
# this is for new versions of cmake
set
(
CTEST_OUTPUT_ON_FAILURE 1
)
# this is for new versions of cmake
endif
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.12.0"
)
endif
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.12.0"
)
# this may be included in our project to access corsika-data by adding
# add_subdirectory (corsika-data)
# to your CMakeLists.txt
# it creates the cmake taget "CorsikaData"
# and it builds the libCorsikaData.a archive.
add_subdirectory
(
readLib
)
add_subdirectory
(
readLib
)
This diff is collapsed.
Click to expand it.
readLib/CMakeLists.txt
+
4
−
0
View file @
afe83dc1
...
@@ -33,15 +33,19 @@ install (
...
@@ -33,15 +33,19 @@ install (
# add unit test, if run inside CORSIKA
# add unit test, if run inside CORSIKA
if
(
COMMAND CORSIKA_ADD_TEST
)
if
(
COMMAND CORSIKA_ADD_TEST
)
message
(
"CorsikaData found CORSIKA_ADD_TEST"
)
if
(
CORSIKA_DATA_WITH_TEST
)
if
(
CORSIKA_DATA_WITH_TEST
)
message
(
"CorsikaData, using CORSIKA_ADD_TEST"
)
CORSIKA_ADD_TEST
(
testData SOURCES source/testData.cc
)
CORSIKA_ADD_TEST
(
testData SOURCES source/testData.cc
)
target_compile_definitions
(
target_compile_definitions
(
testData
testData
PRIVATE
PRIVATE
STANDALONE=1
TESTDATA=
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/source/test.data"
TESTDATA=
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/source/test.data"
)
)
endif
(
CORSIKA_DATA_WITH_TEST
)
endif
(
CORSIKA_DATA_WITH_TEST
)
else
(
COMMAND CORSIKA_ADD_TEST
)
else
(
COMMAND CORSIKA_ADD_TEST
)
message
(
"CorsikaData did not find CORSIKA_ADD_TEST"
)
add_executable
(
testData source/testData.cc
)
add_executable
(
testData source/testData.cc
)
target_link_libraries
(
testData CorsikaData CONAN_PKG::catch2
)
target_link_libraries
(
testData CorsikaData CONAN_PKG::catch2
)
target_compile_options
(
testData PRIVATE -g
)
# do not skip asserts
target_compile_options
(
testData PRIVATE -g
)
# do not skip asserts
...
...
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