diff --git a/CMakeLists.txt b/CMakeLists.txt index f5ee1a4f2b5ff1568613b420eb7d397b0643dec2..3cd6f0ba077e877aa7c1802aa807f9481a073c75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,8 +239,8 @@ target_link_libraries ( CONAN_PKG::spdlog CONAN_PKG::boost cnpy # for SaveBoostHistogram - stdc++fs # experimental::filesystem ) + # "src" is needed, since some headers (namely GeneratedParticleProperties.inc ec.) are produced by python script from e.g. ParticleData.xml add_subdirectory (src) add_subdirectory (documentation) diff --git a/cmake/corsikaConfig.cmake.in b/cmake/corsikaConfig.cmake.in index 81a499c04bb861e6a660d90bee533b461b30f694..546d5141d2c467cf7293bddf4cabef6fa28d481f 100644 --- a/cmake/corsikaConfig.cmake.in +++ b/cmake/corsikaConfig.cmake.in @@ -25,6 +25,12 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) STRING "Choose the type of build." FORCE) endif (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) +#+++++++++++++++++++++++++++++ +# as long as there still are modules using it: +# +enable_language (Fortran) +set (CMAKE_Fortran_FLAGS "-std=legacy -Wfunction-elimination") + #++++++++++++++++++++++++++++ # General config and flags diff --git a/corsika/detail/framework/geometry/QuantityVector.inl b/corsika/detail/framework/geometry/QuantityVector.inl index c7f9457b98dc0935c710f6d93fef6c53aab69f56..a932e4de8b596217bde32b1bb672e69866f05dc6 100644 --- a/corsika/detail/framework/geometry/QuantityVector.inl +++ b/corsika/detail/framework/geometry/QuantityVector.inl @@ -17,8 +17,8 @@ namespace corsika { template <typename TDimension> - inline typename QuantityVector<TDimension>::quantity_type - QuantityVector<TDimension>::operator[](size_t const index) const { + inline typename QuantityVector<TDimension>::quantity_type QuantityVector<TDimension>:: + operator[](size_t const index) const { return quantity_type(phys::units::detail::magnitude_tag, eigenVector_[index]); } diff --git a/modules/qgsjetII/CMakeLists.txt b/modules/qgsjetII/CMakeLists.txt index bef449e65c6e91cbc2066c73dcb389a1e2e1f87f..c566ea2eb61e91c7e4935e73f2bf18898b208dc7 100644 --- a/modules/qgsjetII/CMakeLists.txt +++ b/modules/qgsjetII/CMakeLists.txt @@ -10,20 +10,6 @@ set ( ) enable_language (Fortran) -add_library (QGSJetII SHARED ${MODEL_SOURCES}) -set_target_properties ( - QGSJetII - PROPERTIES - POSITION_INDEPENDENT_CODE 1 - ) - -target_include_directories ( - QGSJetII - PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> - $<INSTALL_INTERFACE:include/corsika_modules/qgsjetII> - ) -target_link_libraries (QGSJetII CorsikaData) add_library (QGSJetII_static STATIC ${MODEL_SOURCES}) set_target_properties ( @@ -46,12 +32,6 @@ install ( DESTINATION include/corsika_modules/qgsjetII ) -install ( - TARGETS QGSJetII - EXPORT CORSIKA8PublicTargets - DESTINATION lib/corsika - ) - install ( TARGETS QGSJetII_static EXPORT CORSIKA8PublicTargets diff --git a/modules/sibyll/CMakeLists.txt b/modules/sibyll/CMakeLists.txt index c974237befbc23ad84283a71759a94867aa5a7e6..7f03881a4462e66016290e218fe52d46021a95e3 100644 --- a/modules/sibyll/CMakeLists.txt +++ b/modules/sibyll/CMakeLists.txt @@ -14,28 +14,14 @@ set ( ) enable_language (Fortran) -add_library (Sibyll SHARED ${MODEL_SOURCES}) add_library (Sibyll_static STATIC ${MODEL_SOURCES}) -set_target_properties ( - Sibyll - PROPERTIES - POSITION_INDEPENDENT_CODE 1 - ) - set_target_properties ( Sibyll_static PROPERTIES POSITION_INDEPENDENT_CODE 1 ) -target_include_directories ( - Sibyll - PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> - $<INSTALL_INTERFACE:include/corsika_modules/sibyll> - ) - target_include_directories ( Sibyll_static PUBLIC @@ -55,12 +41,6 @@ install ( DESTINATION include/corsika_modules/sibyll ) -install ( - TARGETS Sibyll - EXPORT CORSIKA8PublicTargets - LIBRARY DESTINATION lib/corsika - ) - install ( TARGETS Sibyll_static EXPORT CORSIKA8PublicTargets diff --git a/modules/urqmd/CMakeLists.txt b/modules/urqmd/CMakeLists.txt index b6048484806a24e2760f0684074def6726de1e7d..77bb20787191dffe145b5ae85648d32f98a397ca 100644 --- a/modules/urqmd/CMakeLists.txt +++ b/modules/urqmd/CMakeLists.txt @@ -41,17 +41,6 @@ set ( enable_language (Fortran) -add_library (UrQMD SHARED ${MODEL_SOURCES}) -target_include_directories (UrQMD PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> - $<INSTALL_INTERFACE:include/corsika_modules/urqmd> - ) -set_target_properties ( - UrQMD - PROPERTIES - POSITION_INDEPENDENT_CODE 1 - ) - add_library (UrQMD_static STATIC ${MODEL_SOURCES}) target_include_directories (UrQMD_static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> @@ -69,13 +58,6 @@ install ( DESTINATION include/corsika_modules/urqmd ) -install ( - TARGETS UrQMD - EXPORT CORSIKA8PublicTargets - LIBRARY DESTINATION lib/corsika - INCLUDES DESTINATION include/corsika_modules/urqmd - ) - install ( TARGETS UrQMD_static EXPORT CORSIKA8PublicTargets