diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b89adc235c266a4654cf1671fd8b9ff1dcbc02c1..ea4f113e2c3518eeec2ff401abdb8c9f507867f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,24 +1,41 @@ variables: + GIT_STRATEGY: fetch GIT_SSL_NO_VERIFY: "1" - GIT_DEPTH: 10 + GIT_DEPTH: 1 + # to re-use clones also in different forks + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_NAME ## Runtime options for sanitizers # (detect_leaks=0 because leak detection doesn't work in CI, but you can # try to test with leak detection locally by using detect_leaks=1) UBSAN_OPTIONS: "print_stacktrace=1" LSAN_OPTIONS: "log_threads=1" ASAN_OPTIONS: "detect_leaks=0:detect_stack_use_after_return=1" - -# normal multi-step pipeline for each commit + # location of AirShowerPhysics/corsika-data + # CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" + # _alternatively_ corsika-data can be downloaded as submodule: + GIT_SUBMODULE_STRATEGY: normal + + +# +# multi-step pipeline for each commit +# +# Mote: "WIP:" merge request, non-WIP merge requests and "Ready for Code Review" MR are all +# handled explicitly +# stages: - quality - config - build - test + - build_test - example + - build_test_example - install - optional + + ####### CODE QUALITY CHECK ############## ########################################################## @@ -53,6 +70,7 @@ check-clang-format: + ####### CONFIG ############## ########################################################## @@ -63,7 +81,8 @@ check-clang-format: tags: - corsika variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" + before_script: + - cd Data && for F in `find . -name "*.bz2" | grep -v ".git"`; do [ ! -f ${F%%.bz2} ] && bunzip2 -vk $F; done script: - mkdir -p build - cd build @@ -75,6 +94,8 @@ check-clang-format: cache: paths: - build/ + - Data/ + untracked: true policy: pull-push # config for gcc @@ -93,7 +114,8 @@ config-clang-8: -####### BUILD ############## + +####### BUILD (only manual) ############## ########################################################## # the generic build template job @@ -102,18 +124,22 @@ config-clang-8: stage: build tags: - corsika - variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" script: - cd build - cmake --build . -- -j4 rules: - if: $CI_MERGE_REQUEST_ID + when: manual - if: $CI_COMMIT_TAG + when: manual - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual + allow_failure: true cache: paths: - build/ + - Data/ + untracked: true policy: pull-push # build for gcc @@ -135,7 +161,9 @@ build-clang-8: key: "${CI_COMMIT_REF_SLUG}-clang" -####### TEST ############## + + +####### TEST (only manual) ############## ########################################################## # generic test template job @@ -144,17 +172,18 @@ build-clang-8: stage: test tags: - corsika - variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" script: - - git clone https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika-data.git - cd build - set -o pipefail - - ctest -VV | gzip -v -9 > test.log.gz + - ctest -j4 -VV | gzip -v -9 > test.log.gz rules: - if: $CI_MERGE_REQUEST_ID + when: manual - if: $CI_COMMIT_TAG + when: manual - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual + allow_failure: true artifacts: when: always expire_in: 3 days @@ -166,7 +195,9 @@ build-clang-8: cache: paths: - build/ - policy: pull + - Data/ + untracked: true + policy: pull-push # test for gcc test-u-18_04: @@ -188,7 +219,63 @@ test-clang-8: -####### EXAMPLE ############## + +####### BUILD-TEST (all builds <= WIP, default) ############## + +########################################################## +# the generic build_test template job +# normal pipeline for each commit +.build_test: + stage: build_test + tags: + - corsika + script: + - cd build + - cmake --build . -- -j4 + - set -o pipefail + - ctest -j4 -VV | gzip -v -9 > test.log.gz + rules: + - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE =~ /^WIP:/' + - if: $CI_MERGE_REQUEST_ID + when: manual + allow_failure: true + allow_failure: true + artifacts: + when: always + expire_in: 3 days + reports: + junit: + - build/test_outputs/junit*.xml + paths: + - build/test.log.gz + cache: + paths: + - build/ + - Data/ + untracked: true + policy: pull-push + +# build_test for gcc +build_test-u-18_04: + extends: .build_test + image: corsika/devel:u-18.04 + dependencies: + - config-u-18_04 + cache: + key: "${CI_COMMIT_REF_SLUG}-gcc" + +# build_test for clang +build_test-clang-8: + extends: .build_test + image: corsika/devel:clang-8 + dependencies: + - config-clang-8 + cache: + key: "${CI_COMMIT_REF_SLUG}-clang" + + + +####### EXAMPLE (only manual) ############## ########################################################## # generic example template job @@ -197,22 +284,18 @@ test-clang-8: stage: example tags: - corsika - variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" script: - - git clone https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika-data.git - cd build - set -o pipefail - make -j4 run_examples | gzip -v -9 > examples.log.gz rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE =~ /^WIP:/' - when: manual - allow_failure: true - if: $CI_MERGE_REQUEST_ID + when: manual - if: $CI_COMMIT_TAG when: manual - allow_failure: true + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual + allow_failure: true artifacts: when: always expire_in: 3 days @@ -221,6 +304,8 @@ test-clang-8: cache: paths: - build/ + - Data/ + untracked: true policy: pull # example for gcc @@ -242,6 +327,68 @@ example-clang-8: key: "${CI_COMMIT_REF_SLUG}-clang" + +####### BUILD-TEST-EXAMPLE (only non-WIP) ############## + +########################################################## +# generic example template job +# normal pipeline for each commit +.build_test_example: + stage: build_test_example + tags: + - corsika + script: + - cd build + - cmake --build . -- -j4 + - set -o pipefail + - ctest -j4 -VV | gzip -v -9 > test.log.gz + - make -j4 run_examples | gzip -v -9 > examples.log.gz + rules: + - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE =~ /^WIP:/' + when: manual + allow_failure: true + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_MERGE_REQUEST_ID + - if: $CI_COMMIT_TAG + when: manual + allow_failure: true + artifacts: + when: always + expire_in: 3 days + reports: + junit: + - build/test_outputs/junit*.xml + paths: + - build/examples.log.gz + - build/test.log.gz + cache: + paths: + - build/ + - Data/ + untracked: true + policy: pull + +# build_test_example for gcc +build_test_example-u-18_04: + extends: .build_test_example + image: corsika/devel:u-18.04 + dependencies: + - config-u-18_04 + cache: + key: "${CI_COMMIT_REF_SLUG}-gcc" + +# build_test_example for clang +build_test_example-clang-8: + extends: .build_test_example + image: corsika/devel:clang-8 + dependencies: + - config-clang-8 + cache: + key: "${CI_COMMIT_REF_SLUG}-clang" + + + + ####### INSTALL ############## ########################################################## @@ -251,24 +398,23 @@ example-clang-8: stage: install tags: - corsika - variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" script: - cd build - set -o pipefail - make -j2 install rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE =~ /^WIP:/' - when: manual - allow_failure: true - if: $CI_MERGE_REQUEST_ID + when: manual - if: $CI_COMMIT_TAG when: manual - allow_failure: true + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual + allow_failure: true cache: paths: - build/ + - Data/ + untracked: true policy: pull # install for gcc @@ -291,6 +437,7 @@ install-clang-8: + ####### OPTIONAL ############## ########################################################## @@ -300,15 +447,12 @@ install-clang-8: stage: optional tags: - corsika - variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" script: - - git clone https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika-data.git - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release - cmake --build . -- -j4 - set -o pipefail - - ctest -VV | gzip -v -9 > test.log.gz + - ctest -j4 -VV | gzip -v -9 > test.log.gz - make -j4 run_examples rules: - if: '$CI_MERGE_REQUEST_LABELS =~ /Ready for code review/' # run on merge requests, if label 'Ready for code review' is set @@ -324,6 +468,8 @@ install-clang-8: cache: paths: - build/ + - Data/ + untracked: true policy: pull artifacts: when: always @@ -353,8 +499,11 @@ release-full-clang-8: key: "${CI_COMMIT_REF_SLUG}-clang" + + ########################################################## # the coverage generation should either run when manually requested, OR always on the master + coverage: image: corsika/devel:u-18.04 dependencies: @@ -362,8 +511,6 @@ coverage: stage: optional tags: - corsika - variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" script: - cd build - cmake .. -DCMAKE_BUILD_TYPE=Coverage @@ -382,16 +529,21 @@ coverage: when: manual allow_failure: true artifacts: + when: always expire_in: 1 year paths: - build/coverage-report.tar.gz cache: paths: - build/ + - Data/ + untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" + + ########################################################## documentation: image: corsika/devel:u-18.04 @@ -400,8 +552,6 @@ documentation: stage: optional tags: - corsika - variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" script: - cd build - cmake --build . --target doxygen -- -j4 @@ -426,10 +576,13 @@ documentation: cache: paths: - build/ + - Data/ + untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" + ########################################################## sanity: image: corsika/devel:u-18.04 @@ -438,8 +591,6 @@ sanity: stage: optional tags: - corsika - variables: - CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/" script: - cd build - cmake .. -DWITH_CORSIKA_SANITIZERS_ENABLED=ON @@ -458,5 +609,7 @@ sanity: cache: paths: - build/ + - Data/ + untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..a07713df3ce33f27773946cc3ee1b75b445d0ba0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "Data"] + path = Data + url = ../../AirShowerPhysics/corsika-data + branch = master diff --git a/CMakeLists.txt b/CMakeLists.txt index 2524a36f3603fb435aa1587b2aec8fedd6def8a1..86acd1300bd6f0609e0670d59e3269a55c3dba75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required (VERSION 3.9) +# we would need 3.16 to have CMP0097 for external subproject submodule (non) support # prevent in-source builds and give warning message if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") @@ -117,6 +118,17 @@ endif () # add call to ./do-copyright.py to run as unit-test-case add_test (NAME copyright_notices COMMAND ./do-copyright.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +if (DEFINED ENV{CORSIKA_DATA}) + message ("Found corsika-data in $ENV{CORSIKA_DATA}") + set (CORSIKA_DATA $ENV{CORSIKA_DATA}) + add_subdirectory ($ENV{CORSIKA_DATA} corsika_data) +else () + message ("CORSIKA_DATA not defined: NEED to download AirShowerPhysics/corsika-data via git submodule") + message ("cmake will fail if you did not do this already.") + set (CORSIKA_DATA ${PROJECT_SOURCE_DIR}/Data) + add_subdirectory (Data) +endif () + # include potential ThirdParty code provided with CORSIKA add_subdirectory (ThirdParty) diff --git a/Data b/Data new file mode 160000 index 0000000000000000000000000000000000000000..6b490c6b70a37628b0b2ec8b4521fa710bc5029c --- /dev/null +++ b/Data @@ -0,0 +1 @@ +Subproject commit 6b490c6b70a37628b0b2ec8b4521fa710bc5029c diff --git a/Processes/QGSJetII/CMakeLists.txt b/Processes/QGSJetII/CMakeLists.txt index 7d3ed29362347578dc235f85dbe6b330f8d2167b..8e3bb52d415abf20b352c8bbd3268d9dd5e5e841 100644 --- a/Processes/QGSJetII/CMakeLists.txt +++ b/Processes/QGSJetII/CMakeLists.txt @@ -1,5 +1,5 @@ if (NOT DEFINED ENV{CORSIKA_DATA}) - message (WARNING "WARNING: download corsika-data repository from gitlab for needed data tables, and set CORSIKA_DATA path!") + message (WARNING "WARNING: QGSJetII will not work without corsika-data. Set CORSIKA_DATA path!") endif () add_custom_command ( @@ -76,6 +76,7 @@ target_link_libraries ( CORSIKAenvironment CORSIKAsetup CORSIKArandom + CorsikaData ) target_include_directories ( diff --git a/Processes/QGSJetII/qgsjet-II-04.cc b/Processes/QGSJetII/qgsjet-II-04.cc index d7c307d39e0404cac894999665232de05e06bc24..89264a86a196e3d5f4600dc14f0f72c62682172c 100644 --- a/Processes/QGSJetII/qgsjet-II-04.cc +++ b/Processes/QGSJetII/qgsjet-II-04.cc @@ -33,7 +33,3 @@ double qgran_(int&) { std::uniform_real_distribution<double> dist; return dist(rng); } - -void lzmaopenfile_(const char*, int) {} -void lzmaclosefile_() {} -void lzmafillarray_(const double&, const int&) {} diff --git a/Processes/QGSJetII/qgsjet-II-04.f b/Processes/QGSJetII/qgsjet-II-04.f index a3efe5977f9037e6e80eb3ec44864c71e29a6e2a..6a935f62cbed7d30d41e737039507db99c0bcd55 100644 --- a/Processes/QGSJetII/qgsjet-II-04.f +++ b/Processes/QGSJetII/qgsjet-II-04.f @@ -411,52 +411,62 @@ c fp(i) - pomeron vertex constant (i=icz) c----------------------------------------------------------------------------- c reading cross sections from the file + luseCompress=0 if(ifIIdat.ne.1)then - inquire(file=DATDIR(1:INDEX(DATDIR,' ')-1)//'qgsdat-II-04' + inquire(file=DATDIR(1:INDEX(DATDIR,' ')-1)//'qgsdat-II-04.bz2' * ,exist=lcalc) + if (lcalc.and.CorDataCanDeCompress().ne.0) then + luseCompress=1 + else + inquire(file=DATDIR(1:INDEX(DATDIR,' ')-1)//'qgsdat-II-04' + * ,exist=lcalc) + endif else - inquire(file=fnIIdat(1:nfnIIdat),exist=lcalc) !used to link with nexus + luseCompress = (index(fnIIdat(1:nfnIIdat), ".bz2").eq.nfnIIdat-3) + inquire(file=fnIIdat(1:nfnIIdat), exist=lcalc) !used to link with nexus endif - lzmaUse=0 if(lcalc)then if(ifIIdat.ne.1)then - open(1,file=DATDIR(1:INDEX(DATDIR,' ')-1)//'qgsdat-II-04' - * ,status='old') + if (luseCompress.ne.0) then + call CorDataOpenFile(DATDIR(1:INDEX(DATDIR,' ')-1) + * //'qgsdat-II-04.bz2') + else + open(1,file=DATDIR(1:INDEX(DATDIR,' ')-1)//'qgsdat-II-04' + * ,status='old') + endif else !used to link with nexus - if (LEN(fnIIdat).gt.6.and. - * fnIIdat(nfnIIdat-4:nfnIIdat) .eq. ".lzma") then - lzmaUse=1 - call LzmaOpenFile(fnIIdat(1:nfnIIdat)) + if (luseCompress.ne.0) then + call CorDataOpenFile(fnIIdat(1:nfnIIdat)) else - open(ifIIdat,file=fnIIdat(1:nfnIIdat),status='old') + open(ifIIdat, file=fnIIdat(1:nfnIIdat), status='old') endif endif - if (lzmaUse.ne.0) then - - if(debug.ge.0)write (moniou,214) 'qgsdat-II-04.lzma' - - call LzmaFillArray(csborn,size(csborn)) - call LzmaFillArray(cs0,size(cs0)) - call LzmaFillArray(cstot,size(cstot)) - call LzmaFillArray(evk,size(evk)) - call LzmaFillArray(qpomi,size(qpomi)) - call LzmaFillArray(qpomis,size(qpomis)) - call LzmaFillArray(qlegi,size(qlegi)) - call LzmaFillArray(qfanu,size(qfanu)) - call LzmaFillArray(qfanc,size(qfanc)) - call LzmaFillArray(qdfan,size(qdfan)) - call LzmaFillArray(qpomr,size(qpomr)) - call LzmaFillArray(gsect,size(gsect)) - call LzmaFillArray(qlegc0,size(qlegc0)) - call LzmaFillArray(qlegc,size(qlegc)) - call LzmaFillArray(qpomc,size(qpomc)) - call LzmaFillArray(fsud,size(fsud)) - call LzmaFillArray(qrt,size(qrt)) - call LzmaFillArray(qrev,size(qrev)) - call LzmaFillArray(fsud,size(fsud)) - call LzmaFillArray(qrt,size(qrt)) - call LzmaCloseFile() + if (luseCompress.ne.0) then + + if(debug.ge.0)write (moniou,214) 'qgsdat-II-04.bz2' + + call CorDataFillArray(csborn,size(csborn)) + call CorDataFillArray(cs0,size(cs0)) + call CorDataFillArray(cstot,size(cstot)) + call CorDataFillArray(evk,size(evk)) + call CorDataFillArray(qpomi,size(qpomi)) + call CorDataFillArray(qpomis,size(qpomis)) + call CorDataFillArray(qlegi,size(qlegi)) + call CorDataFillArray(qfanu,size(qfanu)) + call CorDataFillArray(qfanc,size(qfanc)) + call CorDataFillArray(qdfan,size(qdfan)) + call CorDataFillArray(qpomr,size(qpomr)) + call CorDataFillArray(gsect,size(gsect)) + call CorDataFillArray(qlegc0,size(qlegc0)) + call CorDataFillArray(qlegc,size(qlegc)) + call CorDataFillArray(qpomc,size(qpomc)) + call CorDataFillArray(fsud,size(fsud)) + call CorDataFillArray(qrt,size(qrt)) + call CorDataFillArray(qrev,size(qrev)) + call CorDataFillArray(fsud,size(fsud)) + call CorDataFillArray(qrt,size(qrt)) + call CorDataCloseFile() else if(debug.ge.0)write (moniou,214) 'qgsdat-II-04' read (1,*)csborn,cs0,cstot,evk,qpomi,qpomis,qlegi,qfanu,qfanc @@ -1955,24 +1965,46 @@ c writing cross sections to the file 10 continue c----------------------------------------------------------------------------- -c nuclear cross sections +c nuclear cross sections + luseCompress=0 if(ifIIncs.ne.2)then + inquire(file=DATDIR(1:INDEX(DATDIR,' ')-1)//'sectnu-II-04.bz2' + * ,exist=lcalc) + if (lcalc.and.CorDataCanDeCompress().ne.0) then + luseCompress=1 + else inquire(file=DATDIR(1:INDEX(DATDIR,' ')-1)//'sectnu-II-04' - * ,exist=lcalc) + * ,exist=lcalc) + endif else !ctp - inquire(file=fnIIncs(1:nfnIIncs),exist=lcalc) + luseCompress = (index(fnIIncs(1:nfnIIncs), ".bz2").eq.nfnIIncs-3) + inquire(file=fnIIncs(1:nfnIIncs), exist=lcalc) endif if(lcalc)then if(debug.ge.0)write (moniou,207) if(ifIIncs.ne.2)then - open(2,file=DATDIR(1:INDEX(DATDIR,' ')-1)//'sectnu-II-04' - * ,status='old') - else !ctp - open(ifIIncs,file=fnIIncs(1:nfnIIncs),status='old') + if (luseCompress.ne.0) then + call CorDataOpenFile( + * DATDIR(1:INDEX(DATDIR,' ')-1)//'sectnu-II-04.bz2') + else + open(2,file=DATDIR(1:INDEX(DATDIR,' ')-1)//'sectnu-II-04' + * ,status='old') + endif + else !ctp + if (luseCompress.ne.0) then + call CorDataOpenFile(fnIIncs(1:nfnIIncs)) + else + open(ifIIncs,file=fnIIncs(1:nfnIIncs),status='old') + endif + endif + if (luseCompress.ne.0)then + call CorDataFillArray(qgsasect, size(qgsasect)) + call CorDataCloseFile() + else + read (2,*)qgsasect + close(2) endif - read (2,*)qgsasect - close(2) elseif(.not.producetables)then write(moniou,*) "Missing sectnu-II-04 file !" diff --git a/Processes/QGSJetII/qgsjet-II-04.h b/Processes/QGSJetII/qgsjet-II-04.h index 352ce650dc845e3c2f30dba35eadc7d637e65eaa..3dcb495a3f461e9c983c6b29de922a796d30ea2a 100644 --- a/Processes/QGSJetII/qgsjet-II-04.h +++ b/Processes/QGSJetII/qgsjet-II-04.h @@ -100,13 +100,6 @@ double qgsect_(const double& e0n, const int& icz, const int& iap0, const int& ia link to random number generation */ double qgran_(int&); - -/** - dummy function from CRMC - */ -void lzmaopenfile_(const char* name, int length); -void lzmaclosefile_(); -void lzmafillarray_(const double& dum, const int& idum); } #endif diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt index e57376b0f4a9259c8ea0a5b38a91795256a2720a..1ce5c22bc89df8127f5d8ff60f47736d11c01cbe 100644 --- a/ThirdParty/CMakeLists.txt +++ b/ThirdParty/CMakeLists.txt @@ -227,6 +227,11 @@ endif (NOT (${USE_CONEX_C8} IN_LIST ThirdPartyChoiceValues)) message (STATUS "USE_CONEX_C8='${USE_CONEX_C8}'") add_library (C8::ext::conex STATIC IMPORTED GLOBAL) +get_directory_property (Boost_iostreams_FOUND DIRECTORY ${CORSIKA_DATA}/readLib DEFINITION Boost_iostreams_FOUND) +set (conex_boost "") +if (NOT Boost_iostreams_FOUND) + set (conex_boost "NO_BOOST=1") +endif (NOT Boost_iostreams_FOUND) if ("x_${USE_CONEX_C8}" STREQUAL "x_SYSTEM") find_package (CONEX REQUIRED) @@ -240,18 +245,24 @@ if ("x_${USE_CONEX_C8}" STREQUAL "x_SYSTEM") set (CONEX_FOUND 1 PARENT_SCOPE) else () - + message (STATUS "Building conex obtained via git and compiled") message (STATUS "This will take a bit.....") + if (${CMAKE_VERSION} VERSION_LESS "3.16.0") + message (WARNING "You need cmake >= 3.16 to support proper external git submodules. Right now, it will be more inefficient than necessary.") + else (${CMAKE_VERSION} VERSION_LESS "3.16.0") + cmake_policy (SET CMP0097 NEW) # avoid cloning of git submodules + endif (${CMAKE_VERSION} VERSION_LESS "3.16.0") ExternalProject_Add (cxroot GIT_REPOSITORY https://gitlab.ikp.kit.edu/AirShowerPhysics/cxroot.git + GIT_SUBMODULES "" GIT_TAG origin/master GIT_SHALLOW 1 GIT_PROGRESS 1 SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cxroot/source INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/cxroot/source CONFIGURE_COMMAND "" - BUILD_COMMAND make CX_NO_ROOT=1 all + BUILD_COMMAND make CX_NO_ROOT=1 ${conex_boost} CORSIKA_DATA=${CORSIKA_DATA} all INSTALL_COMMAND "" BUILD_IN_SOURCE ON EXCLUDE_FROM_ALL TRUE