From 0735c7bad943c43950ba83e2445b636695fedb3d Mon Sep 17 00:00:00 2001 From: ralfulrich <ralf.ulrich@kit.edu> Date: Sat, 3 Oct 2020 11:34:08 +0200 Subject: [PATCH] clang-format is now CLANG_FORMAT try to perform a proper submodule update on the gitlab CI ci removed spdlog submodule re-added spdlog as submodule... fixed gitignore --- .gitignore | 1 - .gitlab-ci.yml | 22 ++++--------------- Documentation/Examples/vertical_EAS.cc | 2 +- Processes/InteractionCounter/CMakeLists.txt | 4 ++-- ...actionCounter.h => InteractionCounter.hpp} | 3 ++- .../InteractionHistogram.cc | 2 +- ...onHistogram.h => InteractionHistogram.hpp} | 2 ++ .../testInteractionCounter.cc | 2 +- ThirdParty/.gitignore | 1 - ThirdParty/CMakeLists.txt | 5 ++--- do-clang-format.py | 4 ++-- 11 files changed, 17 insertions(+), 31 deletions(-) rename Processes/InteractionCounter/{InteractionCounter.h => InteractionCounter.hpp} (99%) rename Processes/InteractionCounter/{InteractionHistogram.h => InteractionHistogram.hpp} (99%) diff --git a/.gitignore b/.gitignore index f578f3b11..5cef2aaf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ *gcov **/*~ **/*.bak -**/*log build/ Framework/Particles/GeneratedParticleProperties.inc flymd.html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1086812c7..1bc50e665 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - GIT_STRATEGY: fetch + GIT_STRATEGY: fetch # clone: fresh clone, fetch: update GIT_SSL_NO_VERIFY: "1" GIT_DEPTH: "1" # to re-use clones also in different forks @@ -13,7 +13,8 @@ variables: # location of AirShowerPhysics/corsika-data CORSIKA_DATA: "${CI_PROJECT_DIR}/Data" # the git submodule # _alternatively_ corsika-data can be downloaded as submodule: - GIT_SUBMODULE_STRATEGY: normal + GIT_SUBMODULE_STRATEGY: normal # none: we get the submodules in before_script, + # normal: get submodules automatically # @@ -79,11 +80,7 @@ check-clang-format: stage: config tags: - corsika - variables: - before_script: - - cd Data && for F in `find . -name "*.bz2" | grep -v ".git"`; do [ ! -f ${F%%.bz2} ] && bunzip2 -vk $F; done - - cd ${CI_PROJECT_DIR} - script: + script: - mkdir -p build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHIA=ON @@ -94,7 +91,6 @@ check-clang-format: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull-push @@ -138,7 +134,6 @@ config-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull-push @@ -195,7 +190,6 @@ build-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull-push @@ -252,7 +246,6 @@ test-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull-push @@ -305,7 +298,6 @@ build_test-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull @@ -365,7 +357,6 @@ example-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull @@ -415,7 +406,6 @@ build_test_example-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull @@ -470,7 +460,6 @@ install-clang-8: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull artifacts: @@ -540,7 +529,6 @@ coverage: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" @@ -580,7 +568,6 @@ documentation: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" @@ -613,7 +600,6 @@ sanity: cache: paths: - ${CI_PROJECT_DIR}/build/ - - ${CI_PROJECT_DIR}/Data/ untracked: true policy: pull key: "${CI_COMMIT_REF_SLUG}-gcc" diff --git a/Documentation/Examples/vertical_EAS.cc b/Documentation/Examples/vertical_EAS.cc index 6eb662ec4..09766d958 100644 --- a/Documentation/Examples/vertical_EAS.cc +++ b/Documentation/Examples/vertical_EAS.cc @@ -18,7 +18,6 @@ #include <corsika/process/ProcessSequence.h> #include <corsika/process/StackProcess.h> #include <corsika/process/energy_loss/EnergyLoss.h> -#include <corsika/process/interaction_counter/InteractionCounter.h> #include <corsika/process/longitudinal_profile/LongitudinalProfile.h> #include <corsika/process/observation_plane/ObservationPlane.h> #include <corsika/process/on_shell_check/OnShellCheck.h> @@ -37,6 +36,7 @@ #include <corsika/setup/SetupTrajectory.h> #include <corsika/units/PhysicalUnits.h> #include <corsika/utl/CorsikaFenv.h> +#include <corsika/process/interaction_counter/InteractionCounter.hpp> #include <iomanip> #include <iostream> diff --git a/Processes/InteractionCounter/CMakeLists.txt b/Processes/InteractionCounter/CMakeLists.txt index f828ac98a..7602d4e7c 100644 --- a/Processes/InteractionCounter/CMakeLists.txt +++ b/Processes/InteractionCounter/CMakeLists.txt @@ -1,7 +1,7 @@ set ( MODEL_HEADERS - InteractionCounter.h - InteractionHistogram.h + InteractionCounter.hpp + InteractionHistogram.hpp ) set ( diff --git a/Processes/InteractionCounter/InteractionCounter.h b/Processes/InteractionCounter/InteractionCounter.hpp similarity index 99% rename from Processes/InteractionCounter/InteractionCounter.h rename to Processes/InteractionCounter/InteractionCounter.hpp index f91aa5101..83bc13001 100644 --- a/Processes/InteractionCounter/InteractionCounter.h +++ b/Processes/InteractionCounter/InteractionCounter.hpp @@ -8,9 +8,10 @@ #pragma once +#include <corsika/process/interaction_counter/InteractionHistogram.hpp> + #include <corsika/process/InteractionProcess.h> #include <corsika/process/ProcessSequence.h> -#include <corsika/process/interaction_counter/InteractionHistogram.h> #include <corsika/setup/SetupStack.h> namespace corsika::process::interaction_counter { diff --git a/Processes/InteractionCounter/InteractionHistogram.cc b/Processes/InteractionCounter/InteractionHistogram.cc index 583184b07..a54b63bd1 100644 --- a/Processes/InteractionCounter/InteractionHistogram.cc +++ b/Processes/InteractionCounter/InteractionHistogram.cc @@ -6,7 +6,7 @@ * the license. */ -#include <corsika/process/interaction_counter/InteractionHistogram.h> +#include <corsika/process/interaction_counter/InteractionHistogram.hpp> #include <fstream> #include <string> diff --git a/Processes/InteractionCounter/InteractionHistogram.h b/Processes/InteractionCounter/InteractionHistogram.hpp similarity index 99% rename from Processes/InteractionCounter/InteractionHistogram.h rename to Processes/InteractionCounter/InteractionHistogram.hpp index 9d060a4ef..ec9124e49 100644 --- a/Processes/InteractionCounter/InteractionHistogram.h +++ b/Processes/InteractionCounter/InteractionHistogram.hpp @@ -6,6 +6,8 @@ * the license. */ +#pragma once + #include <corsika/particles/ParticleProperties.h> #include <corsika/units/PhysicalUnits.h> diff --git a/Processes/InteractionCounter/testInteractionCounter.cc b/Processes/InteractionCounter/testInteractionCounter.cc index 7d8f78041..08fc95113 100644 --- a/Processes/InteractionCounter/testInteractionCounter.cc +++ b/Processes/InteractionCounter/testInteractionCounter.cc @@ -6,7 +6,7 @@ * the license. */ -#include <corsika/process/interaction_counter/InteractionCounter.h> +#include <corsika/process/interaction_counter/InteractionCounter.hpp> #include <corsika/environment/Environment.h> #include <corsika/environment/HomogeneousMedium.h> diff --git a/ThirdParty/.gitignore b/ThirdParty/.gitignore index b4bac0ecf..0d7fe2795 100644 --- a/ThirdParty/.gitignore +++ b/ThirdParty/.gitignore @@ -1,2 +1 @@ eigen-eigen-b3f3d4950030/ - diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt index 27c166eb9..19cc00b37 100644 --- a/ThirdParty/CMakeLists.txt +++ b/ThirdParty/CMakeLists.txt @@ -1,3 +1,5 @@ +add_subdirectory (spdlog) # this is a git submodule + add_library (CORSIKAthirdparty INTERFACE) target_include_directories (CORSIKAthirdparty SYSTEM @@ -16,9 +18,6 @@ set (ThirdPartyChoiceValues "C8;SYSTEM" CACHE STRING "List of possible values for the ThirdParty package choice") mark_as_advanced (ThirdPartyChoiceValues) -############################################################################## -# Build spdlog -add_subdirectory (spdlog) ############################################################################## # check for boost: either use C8 or system-level installation diff --git a/do-clang-format.py b/do-clang-format.py index ed5938ae3..e34065028 100755 --- a/do-clang-format.py +++ b/do-clang-format.py @@ -28,7 +28,7 @@ if args.all: if doExclude: continue for f in filenames: - if f.endswith(".h") or f.endswith(".cc"): + if f.endswith(".h") or f.endswith(".cc") or f.endswith(".hpp") or f.endswith(".cpp") or f.endswith(".cxx"): filename = os.path.join(dirpath, f) if not os.path.islink(filename): filelist.append(filename) @@ -52,7 +52,7 @@ else: cmd = "clang-format" if "CLANG_FORMAT" in os.environ: cmd = os.environ["CLANG_FORMAT"] - cmd += " -style=file" +cmd += " -style=file" if args.apply: for filename in filelist: subp.check_call(cmd.split() + ["-i", filename]) -- GitLab