IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 81a0c784 authored by ralfulrich's avatar ralfulrich Committed by Ralf Ulrich
Browse files

config.hpp -> corsika.hpp

parent 924be401
No related branches found
No related tags found
No related merge requests found
...@@ -17,8 +17,12 @@ include (GNUInstallDirs) ...@@ -17,8 +17,12 @@ include (GNUInstallDirs)
#+++++++++++++++++++++++++++++ #+++++++++++++++++++++++++++++
# project name # project name
# version is: "8.major.minor.patch"
# major: API changes
# minor: no API changes
# patch: bug fix and small improvements
# #
set (c8_version 8.0.0) set (c8_version 8.0.0.0)
project ( project (
corsika corsika
VERSION ${c8_version} VERSION ${c8_version}
...@@ -317,22 +321,22 @@ configure_package_config_file ( ...@@ -317,22 +321,22 @@ configure_package_config_file (
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX} INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}
) )
# #
# generate "corsika/config.hpp" file with cmake-level details and paths # generate "corsika/corsika.hpp" file with cmake-level details and paths
# first for build-tree # first for build-tree
# #
# the location of the "corsika-data" is of fundamental importance # the location of the "corsika-data" is of fundamental importance
set (CORSIKA_CMAKE_DATA_DIR ${CMAKE_SOURCE_DIR}/modules/data) set (CORSIKA_CMAKE_DATA_DIR ${CMAKE_SOURCE_DIR}/modules/data)
configure_file ( configure_file (
cmake/config.hpp.in cmake/corsika.hpp.in
${PROJECT_BINARY_DIR}/corsika/config.hpp ${PROJECT_BINARY_DIR}/corsika/corsika.hpp
) )
# #
# second also for install-tree # second also for install-tree
# #
set (CORSIKA_CMAKE_DATA_DIR "${CMAKE_INSTALL_FULL_DATADIR}/corsika/data") set (CORSIKA_CMAKE_DATA_DIR "${CMAKE_INSTALL_FULL_DATADIR}/corsika/data")
configure_file ( configure_file (
cmake/config.hpp.in cmake/corsika.hpp.in
${PROJECT_BINARY_DIR}/config.hpp-install ${PROJECT_BINARY_DIR}/corsika.hpp-install
) )
# #
# installation of cmake and config files # installation of cmake and config files
...@@ -358,8 +362,8 @@ install ( ...@@ -358,8 +362,8 @@ install (
# also install-level config.hpp # also install-level config.hpp
# #
install (FILES install (FILES
${PROJECT_BINARY_DIR}/config.hpp-install ${PROJECT_BINARY_DIR}/corsika.hpp-install
RENAME config.hpp RENAME corsika.hpp
DESTINATION include/corsika DESTINATION include/corsika
) )
# #
......
namespace corsika {
/**
* @file config.hpp
*
* @brief CORSIKA_DATA_DIR is a cmake-time marker for the location of corsika-data.
*
* the location of the "corsika-data" is of fundamental importance
* this should not be done in corsikaDefines.cmake since we may want
* to change behaviour at config/build/install time.
*
* There is a build-time default location of corsika-data at: "modules/data",
* but there is also an install-time default location of corsika-data at
* "share/corsika/data".
* The search for corsika-data can always be overwritten by the
* user with the `CORSIKA_DATA` envrionment variable.
*/
static std::string const CORSIKA_DATA_DIR = "@CORSIKA_CMAKE_DATA_DIR@";
} // namespace corsika
\ No newline at end of file
#pragma once
namespace corsika {
/**
* @file corsika.hpp
*
* The CORSIKA 8 air shower simulation framework.
*
* @mainpage Technical documentation of the CORSIKA 8 software framework.
*
* Software documentatin and reference guide for the CORSIKA 8
* software framework for air shower simulations. CORSIKA 8 is developed
* at <a
* href="https://gitlab.ikp.kit.edu/AirShowerPhysics">https://gitlab.ikp.kit.edu</a>. If
* you got the code from somewhere else, consider to switch to the official development
* repository. If you want to report bugs, or want to suggest features or future
* development, please submit an "issue" on this gitlab server. We only accept Issues
* and discussion via our central development server https://gitlab.ikp.kit.edu.
*
* Write to corsika-devel@lists.kit.edu, or even register yourself at
* https://www.lists.kit.edu/sympa/info/corsika-devel to get in contact
* with other developers.
*
* For more information about the project, see @ref md_README.
*/
// clang-format-off
/*! Usage:
* to get the version R.X.Y.Z,
* x: major version
* y: minor version
* z: patch number
*/
static std::string const CORSIKA_VERSION = "@PROJECT_VERSION@";
/*!
* The value of \p CORSIKA_RELEASE_VERSION encodes the
* main release version number of CORSIKA. It is "8" right now.
*/
static unsigned int const CORSIKA_RELEASE_NUMBER = @PROJECT_VERSION_MAJOR@;
/*!
* The value of \p CORSIKA_MAJOR_VERSION encodes the
* major release version number of CORSIKA.
*/
static unsigned int const CORSIKA_MAJOR_NUMBER = @PROJECT_VERSION_MINOR@;
/*!
* The value of \p CORSIKA_MINOR_NUMBER encodes the
* minor release number of the CORSIKA library.
*/
static unsigned int const CORSIKA_MINOR_NUMBER = @PROJECT_VERSION_PATCH@;
/*!
* The value of \p CORSIKA_PATCH_NUMBER encodes the
* patch number of the CORSIKA library.
*/
static std::string const CORSIKA_PATCH_NUMBER = @PROJECT_VERSION_TWEAK@;
/**
*
* CORSIKA_DATA_DIR is a cmake-time marker for the location of corsika-data.
*
* the location of the "corsika-data" is of fundamental importance
* this should not be done in corsikaDefines.cmake since we may want
* to change behaviour at config/build/install time.
*
* There is a build-time default location of corsika-data at: "modules/data",
* but there is also an install-time default location of corsika-data at
* "share/corsika/data".
* The search for corsika-data can always be overwritten by the
* user with the `CORSIKA_DATA` envrionment variable.
*/
static std::string const CORSIKA_DATA_DIR = "@CORSIKA_CMAKE_DATA_DIR@";
// clang-format-on
} // namespace corsika
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
/**
* @file corsika.hpp
*
* The CORSIKA 8 air shower simulation framework.
*
* @mainpage Technical documentation of the CORSIKA 8 software framework.
*
* Software documentatin and reference guide for the CORSIKA 8
* software framework for air shower simulations. CORSIKA 8 is developed
* at <a
* href="https://gitlab.ikp.kit.edu/AirShowerPhysics">https://gitlab.ikp.kit.edu</a>. If
* you got the code from somewhere else, consider to switch to the official development
* repository. If you want to report bugs, or want to suggest features or future
* development, please submit an "issue" on this gitlab server. We only accept Issues and
* discussion via our central development server https://gitlab.ikp.kit.edu.
*
* Write to corsika-devel@lists.kit.edu, or even register yourself at
* https://www.lists.kit.edu/sympa/info/corsika-devel to get in contact
* with other developers.
*
* For more information about the project, see @ref md_README.
*/
/*! Usage:
* to get the version X.YY.Z,
* set CORSIKA_VERSION X0YY0Z
*/
#define CORSIKA_VERSION 800000
/*! \def CORSIKA_MAJOR_VERSION
* \brief The preprocessor macro \p CORSIKA_MAJOR_VERSION encodes the
* major version number of CORSIKA.
*/
#define CORSIKA_MAJOR_VERSION (CORSIKA_VERSION / 100000)
/*! \def CORSIKA_MINOR_VERSION
* \brief The preprocessor macro \p CORSIKA_MINOR_VERSION encodes the
* minor version number of CORSIKA.
*/
#define CORSIKA_MINOR_VERSION (CORSIKA_VERSION / 100 % 1000)
/*! \def CORSIKA_PATCH_NUMBER
* \brief The preprocessor macro \p CORSIKA_PATCH_NUMBER encodes the
* patch number of the CORSIKA library.
*/
#define CORSIKA_PATCH_NUMBER 0
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
#pragma once #pragma once
#include <corsika/config.hpp> #include <corsika/corsika.hpp>
#include <corsika/framework/core/Logging.hpp> #include <corsika/framework/core/Logging.hpp>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
namespace corsika { namespace corsika {
inline boost::filesystem::path corsika_data(boost::filesystem::path const& key) { inline boost::filesystem::path corsika_data(boost::filesystem::path const& key) {
boost::filesystem::path fname = boost::filesystem::path(CORSIKA_DATA_DIR) / key; boost::filesystem::path fname =
boost::filesystem::path(corsika::CORSIKA_DATA_DIR) / key;
// LCOV_EXCL_START, this cannot be easily tested system-independently // LCOV_EXCL_START, this cannot be easily tested system-independently
if (auto const* p = std::getenv("CORSIKA_DATA"); p != nullptr) { if (auto const* p = std::getenv("CORSIKA_DATA"); p != nullptr) {
fname = boost::filesystem::path(p) / key; fname = boost::filesystem::path(p) / key;
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#pragma once #pragma once
#include <corsika/corsika.hpp>
#include <corsika/framework/process/ProcessReturn.hpp> #include <corsika/framework/process/ProcessReturn.hpp>
#include <corsika/framework/core/PhysicalUnits.hpp> #include <corsika/framework/core/PhysicalUnits.hpp>
#include <corsika/framework/random/ExponentialDistribution.hpp> #include <corsika/framework/random/ExponentialDistribution.hpp>
...@@ -82,6 +84,8 @@ namespace corsika { ...@@ -82,6 +84,8 @@ namespace corsika {
, output_(out) , output_(out)
, stack_(stack) { , stack_(stack) {
CORSIKA_LOG_INFO(c8_ascii_); CORSIKA_LOG_INFO(c8_ascii_);
CORSIKA_LOG_INFO("This is CORSIKA {}.{}.{}.{}", CORSIKA_RELEASE_NUMBER,
CORSIKA_MAJOR_NUMBER, CORSIKA_MINOR_NUMBER, CORSIKA_PATCH_NUMBER);
CORSIKA_LOG_INFO("Tracking algorithm: {} (version {})", TTracking::getName(), CORSIKA_LOG_INFO("Tracking algorithm: {} (version {})", TTracking::getName(),
TTracking::getVersion()); TTracking::getVersion());
if constexpr (stack_view_type::has_event) { if constexpr (stack_view_type::has_event) {
......
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