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
d7c3a493
Commit
d7c3a493
authored
4 years ago
by
Ralf Ulrich
Committed by
Maximilian Reininghaus
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "WITH_HISTORY not working"
parent
59ccd241
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
+0
-10
0 additions, 10 deletions
CMakeLists.txt
cmake/corsikaConfig.cmake.in
+46
-0
46 additions, 0 deletions
cmake/corsikaConfig.cmake.in
corsika/setup/SetupStack.hpp
+7
-4
7 additions, 4 deletions
corsika/setup/SetupStack.hpp
with
53 additions
and
14 deletions
CMakeLists.txt
+
0
−
10
View file @
d7c3a493
...
...
@@ -193,12 +193,6 @@ if (NOT DEFINED ENV{CI})
add_test
(
NAME copyright_notices COMMAND ./do-copyright.py WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
)
endif
(
NOT DEFINED ENV{CI}
)
#+++++++++++++++++++++++++++++
# Options
#
# HISTORY option selection
option
(
WITH_HISTORY
"Flag to switch on/off HISTORY"
ON
)
#+++++++++++++++++++++++++++++
# Externals
#
...
...
@@ -346,13 +340,9 @@ install (DIRECTORY examples DESTINATION share/corsika)
add_subdirectory
(
tools
)
#+++++++++++++++++++++++++++++++
#
# final summary output
#
include
(
FeatureSummary
)
add_feature_info
(
HISTORY WITH_HISTORY
"Full information on cascade history for particles."
)
feature_summary
(
WHAT ALL
)
This diff is collapsed.
Click to expand it.
cmake/corsikaConfig.cmake.in
+
46
−
0
View file @
d7c3a493
...
...
@@ -2,6 +2,30 @@ set (CORSIKA8_VERSION @c8_version@)
@PACKAGE_INIT@
#+++++++++++++++++++++++++++
# Options
#
option (WITH_HISTORY "Flag to switch on/off HISTORY" ON)
#+++++++++++++++++++++++++++++
# Build types settings
#
# setup coverage build type
set (CMAKE_CXX_FLAGS_COVERAGE "-g --coverage")
set (CMAKE_EXE_LINKER_FLAGS_COVERAGE "--coverage")
set (CMAKE_SHARED_LINKER_FLAGS_COVERAGE "--coverage")
# set a flag to inform code that we are in debug mode
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
set (ALLOWED_BUILD_TYPES Debug Release MinSizeRel RelWithDebInfo Coverage)
set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${ALLOWED_BUILD_TYPES})
set (DEFAULT_BUILD_TYPE "Release")
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set (CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE
STRING "Choose the type of build." FORCE)
endif (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
#++++++++++++++++++++++++++++
# General config and flags
#
...
...
@@ -37,3 +61,25 @@ message (STATUS "Pythia8 at: @Pythia8_PREFIX@")
#
include ("${CMAKE_CURRENT_LIST_DIR}/corsikaTargets.cmake")
check_required_components (corsika)
#+++++++++++++++++++++++++++++++
# add further definitions / options
#
if (WITH_HISTORY)
set_property (
TARGET CORSIKA8::CORSIKA8
APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS "WITH_HISTORY"
)
endif (WITH_HISTORY)
#+++++++++++++++++++++++++++++++
#
# final summary output
#
include (FeatureSummary)
add_feature_info (HISTORY WITH_HISTORY "Full information on cascade history for particles.")
feature_summary (WHAT ALL)
This diff is collapsed.
Click to expand it.
corsika/setup/SetupStack.hpp
+
7
−
4
View file @
d7c3a493
...
...
@@ -18,12 +18,15 @@ namespace corsika::setup {
#ifdef WITH_HISTORY
#include
<corsika/stack/history/HistoryStackExtension.hpp>
#include
<corsika/stack/history/HistorySecondaryProducer.hpp>
/*
* the version with history
*/
using
Stack
=
detail
::
StackWithHistory
;
template
<
typename
T1
,
template
<
typename
>
typename
M2
>
using
StackViewProducer
=
HistorySecondaryProducer
<
T1
,
M2
>
;
using
StackViewProducer
=
history
::
HistorySecondaryProducer
<
T1
,
M2
>
;
#else // WITH_HISTORY
...
...
@@ -32,7 +35,7 @@ namespace corsika::setup {
*/
using
Stack
=
detail
::
StackWithGeometry
;
template
<
typename
T1
,
template
<
typename
>
typename
M2
>
using
StackViewProducer
=
corsika
::
DefaultSecondaryProducer
<
T1
,
M2
>
;
using
StackViewProducer
=
DefaultSecondaryProducer
<
T1
,
M2
>
;
#endif
...
...
@@ -58,7 +61,7 @@ namespace corsika::setup {
// CHECK with CLANG: setup::Stack::MPIType>;
detail
::
StackWithHistoryInterface
,
StackViewProducer
>
;
#elif defined(__GNUC__) || defined(__GNUG__)
using
StackView
=
m
ake
_v
iew
<
setup
::
Stack
,
StackViewProducer
>::
type
;
using
StackView
=
M
ake
V
iew
<
setup
::
Stack
,
StackViewProducer
>::
type
;
#endif
#else // WITH_HISTORY
...
...
@@ -69,7 +72,7 @@ namespace corsika::setup {
// setup::Stack::MPIType>;
setup
::
detail
::
StackWithGeometryInterface
>
;
#elif defined(__GNUC__) || defined(__GNUG__)
using
StackView
=
corsika
::
MakeView
<
setup
::
Stack
>::
type
;
using
StackView
=
MakeView
<
setup
::
Stack
>::
type
;
#endif
#endif // WITH_HISTORY
...
...
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