diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3c24751..27b5bef8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: tests-fullSetup: strategy: matrix: - setup: [ {os: ubuntu-latest}, {os: windows-latest}, {os: macos-latest}] + setup: [ {os: ubuntu-latest}, {os: windows-latest}, {os: macos-latest}, {os: ubuntu-20.04}] runs-on: ${{matrix.setup.os}} if: "!contains(github.event.head_commit.message, 'skip-ci')" @@ -38,7 +38,7 @@ jobs: - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v2 id: cpu-cores - - run: python3 Setup.py --options CompileBaryo=True + - run: python3 Setup.py --options CompileBaryo=True --build-missing - name: Set cmake preset name run: python3 .github/GetProfile.py diff --git a/Build.py b/Build.py index 1a5e38e0..c4882ce1 100644 --- a/Build.py +++ b/Build.py @@ -29,7 +29,7 @@ def build(preset): def main(): Setup.setup_profiles() - Setup.conan_install_all(Setup.BuildMode.release) + Setup.conan_install_all(Setup.BuildMode.release,build_missing=True) build(get_preset()) if __name__ == "__main__": diff --git a/Setup.py b/Setup.py index 41670f60..27e96eb8 100644 --- a/Setup.py +++ b/Setup.py @@ -24,6 +24,19 @@ class BuildMode(ArgTypeEnum, Enum): release = (1,) debug = 2 +def get_compiler(): + compiler="" + + if sys.platform != "linux": + return compiler + + compiler += "-gcc-" + compiler += get_gcc_version() + + + + return compiler + def get_profile(os: str, arch: str, build_type: BuildMode): profile = "" if os == "win32": @@ -43,8 +56,16 @@ def get_profile(os: str, arch: str, build_type: BuildMode): profile += "-" profile += arch + profile += get_compiler() + + return profile +def get_gcc_version(): + version_response = subprocess.check_output('gcc --version'.split(), encoding="UTF-8").partition("\n")[0] + semver_string=version_response[version_response.rfind(' ')+1:] + major = semver_string.partition('.')[0] + return major def get_arch(): arch = "x86_64" diff --git a/profiles/BSMPT/linux-debug-armv8-gcc-11 b/profiles/BSMPT/linux-debug-armv8-gcc-11 new file mode 100644 index 00000000..8410c2e2 --- /dev/null +++ b/profiles/BSMPT/linux-debug-armv8-gcc-11 @@ -0,0 +1,10 @@ +[settings] +arch=armv8 +build_type=Debug +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=11 +os=Linux + + diff --git a/profiles/BSMPT/linux-debug-armv8-gcc-13 b/profiles/BSMPT/linux-debug-armv8-gcc-13 new file mode 100644 index 00000000..adad50b4 --- /dev/null +++ b/profiles/BSMPT/linux-debug-armv8-gcc-13 @@ -0,0 +1,10 @@ +[settings] +arch=armv8 +build_type=Debug +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=13 +os=Linux + + diff --git a/profiles/BSMPT/linux-debug-armv8-gcc-9 b/profiles/BSMPT/linux-debug-armv8-gcc-9 new file mode 100644 index 00000000..6f7d1062 --- /dev/null +++ b/profiles/BSMPT/linux-debug-armv8-gcc-9 @@ -0,0 +1,10 @@ +[settings] +arch=armv8 +build_type=Debug +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=9 +os=Linux + + diff --git a/profiles/BSMPT/linux-debug-x86_64-gcc-11 b/profiles/BSMPT/linux-debug-x86_64-gcc-11 new file mode 100644 index 00000000..e543416c --- /dev/null +++ b/profiles/BSMPT/linux-debug-x86_64-gcc-11 @@ -0,0 +1,10 @@ +[settings] +arch=x86_64 +build_type=Debug +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=11 +os=Linux + + diff --git a/profiles/BSMPT/linux-debug-x86_64-gcc-13 b/profiles/BSMPT/linux-debug-x86_64-gcc-13 new file mode 100644 index 00000000..6ce2752a --- /dev/null +++ b/profiles/BSMPT/linux-debug-x86_64-gcc-13 @@ -0,0 +1,10 @@ +[settings] +arch=x86_64 +build_type=Debug +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=13 +os=Linux + + diff --git a/profiles/BSMPT/linux-debug-x86_64-gcc-9 b/profiles/BSMPT/linux-debug-x86_64-gcc-9 new file mode 100644 index 00000000..19f5874c --- /dev/null +++ b/profiles/BSMPT/linux-debug-x86_64-gcc-9 @@ -0,0 +1,10 @@ +[settings] +arch=x86_64 +build_type=Debug +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=9 +os=Linux + + diff --git a/profiles/BSMPT/linux-release-armv8-gcc-11 b/profiles/BSMPT/linux-release-armv8-gcc-11 new file mode 100644 index 00000000..22c063e0 --- /dev/null +++ b/profiles/BSMPT/linux-release-armv8-gcc-11 @@ -0,0 +1,9 @@ +[settings] +arch=armv8 +build_type=Release +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=11 +os=Linux + diff --git a/profiles/BSMPT/linux-release-armv8-gcc-13 b/profiles/BSMPT/linux-release-armv8-gcc-13 new file mode 100644 index 00000000..d5abd1fe --- /dev/null +++ b/profiles/BSMPT/linux-release-armv8-gcc-13 @@ -0,0 +1,9 @@ +[settings] +arch=armv8 +build_type=Release +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=13 +os=Linux + diff --git a/profiles/BSMPT/linux-release-armv8-gcc-9 b/profiles/BSMPT/linux-release-armv8-gcc-9 new file mode 100644 index 00000000..81121dd2 --- /dev/null +++ b/profiles/BSMPT/linux-release-armv8-gcc-9 @@ -0,0 +1,9 @@ +[settings] +arch=armv8 +build_type=Release +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=9 +os=Linux + diff --git a/profiles/BSMPT/linux-release-x86_64-gcc-11 b/profiles/BSMPT/linux-release-x86_64-gcc-11 new file mode 100644 index 00000000..09056155 --- /dev/null +++ b/profiles/BSMPT/linux-release-x86_64-gcc-11 @@ -0,0 +1,9 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=11 +os=Linux + diff --git a/profiles/BSMPT/linux-release-x86_64-gcc-13 b/profiles/BSMPT/linux-release-x86_64-gcc-13 new file mode 100644 index 00000000..6464ce9f --- /dev/null +++ b/profiles/BSMPT/linux-release-x86_64-gcc-13 @@ -0,0 +1,9 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=13 +os=Linux + diff --git a/profiles/BSMPT/linux-release-x86_64-gcc-9 b/profiles/BSMPT/linux-release-x86_64-gcc-9 new file mode 100644 index 00000000..a0723f2e --- /dev/null +++ b/profiles/BSMPT/linux-release-x86_64-gcc-9 @@ -0,0 +1,9 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=9 +os=Linux + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 341a5a64..8c6aa646 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,32 +20,32 @@ add_subdirectory(utility) add_executable(BSMPT prog/BSMPT.cpp) target_link_libraries(BSMPT Minimizer Models Utility) -target_compile_features(BSMPT PUBLIC cxx_std_14) +target_compile_features(BSMPT PUBLIC cxx_std_17) add_executable(VEVEVO prog/VEVEVO.cpp) target_link_libraries(VEVEVO Minimizer Models Utility) -target_compile_features(VEVEVO PUBLIC cxx_std_14) +target_compile_features(VEVEVO PUBLIC cxx_std_17) add_executable(NLOVEV prog/NLOVEV.cpp) target_link_libraries(NLOVEV Minimizer Models Utility) -target_compile_features(NLOVEV PUBLIC cxx_std_14) +target_compile_features(NLOVEV PUBLIC cxx_std_17) add_executable(CalcCT prog/CalcCT.cpp) target_link_libraries(CalcCT Models Utility) -target_compile_features(CalcCT PUBLIC cxx_std_14) +target_compile_features(CalcCT PUBLIC cxx_std_17) add_executable(TripleHiggsCouplingsNLO prog/TripleHiggsNLO.cpp) target_link_libraries(TripleHiggsCouplingsNLO Models Utility) -target_compile_features(TripleHiggsCouplingsNLO PUBLIC cxx_std_14) +target_compile_features(TripleHiggsCouplingsNLO PUBLIC cxx_std_17) add_executable(Test prog/Test.cpp) target_link_libraries(Test Minimizer Models Utility) -target_compile_features(Test PUBLIC cxx_std_14) +target_compile_features(Test PUBLIC cxx_std_17) if(BSMPTCompileBaryo) add_executable(CalculateEWBG prog/CalculateEWBG.cpp) target_link_libraries(CalculateEWBG Minimizer Models Baryo Utility) - target_compile_features(CalculateEWBG PUBLIC cxx_std_14) + target_compile_features(CalculateEWBG PUBLIC cxx_std_17) else(BSMPTCompileBaryo) message("CalculateEWBG will not compile as Boost is missing") endif(BSMPTCompileBaryo) @@ -53,7 +53,7 @@ endif(BSMPTCompileBaryo) if(BSMPTCompileBaryo) add_executable(PlotEWBG_vw prog/PlotEWBG_vw.cpp) target_link_libraries(PlotEWBG_vw Minimizer Models Baryo Utility) - target_compile_features(PlotEWBG_vw PUBLIC cxx_std_14) + target_compile_features(PlotEWBG_vw PUBLIC cxx_std_17) else(BSMPTCompileBaryo) message("PlotEWBG_vw will not compile as Boost is missing") endif(BSMPTCompileBaryo) @@ -61,7 +61,7 @@ endif(BSMPTCompileBaryo) if(BSMPTCompileBaryo) add_executable(PlotEWBG_nL prog/PlotEWBG_nL.cpp) target_link_libraries(PlotEWBG_nL Minimizer Models Baryo Utility) - target_compile_features(PlotEWBG_nL PUBLIC cxx_std_14) + target_compile_features(PlotEWBG_nL PUBLIC cxx_std_17) else(BSMPTCompileBaryo) message("PlotEWBG_nL will not compile as Boost is missing") endif(BSMPTCompileBaryo) @@ -74,7 +74,7 @@ if(MakeAdditionalTesting) if(BSMPTCompileBaryo) add_executable(CreateMuGrid prog/CreateMuGrid.cpp) target_link_libraries(CreateMuGrid Minimizer Models Baryo Utility) - target_compile_features(CreateMuGrid PUBLIC cxx_std_14) + target_compile_features(CreateMuGrid PUBLIC cxx_std_17) else(BSMPTCompileBaryo) message("CreateMuGrid will not compile as Boost is missing") endif(BSMPTCompileBaryo) @@ -82,7 +82,7 @@ if(MakeAdditionalTesting) if(BSMPTCompileBaryo) add_executable(Kfactor_grid prog/Kfactor_grid.cpp) target_link_libraries(Kfactor_grid Minimizer Models Kfactors Utility) - target_compile_features(Kfactor_grid PUBLIC cxx_std_14) + target_compile_features(Kfactor_grid PUBLIC cxx_std_17) else(BSMPTCompileBaryo) message("Kfactor_grid will not compile as Boost is missing") endif(BSMPTCompileBaryo) diff --git a/src/Kfactors/CMakeLists.txt b/src/Kfactors/CMakeLists.txt index 2765e218..6d62483a 100644 --- a/src/Kfactors/CMakeLists.txt +++ b/src/Kfactors/CMakeLists.txt @@ -20,4 +20,4 @@ if(OpenMP_FOUND) target_link_libraries(Kfactors PUBLIC OpenMP::OpenMP_CXX) endif() target_include_directories(Kfactors PUBLIC ${BSMPT_SOURCE_DIR}/include) -target_compile_features(Kfactors PUBLIC cxx_std_14) +target_compile_features(Kfactors PUBLIC cxx_std_17) diff --git a/src/ThermalFunctions/CMakeLists.txt b/src/ThermalFunctions/CMakeLists.txt index 476759e5..8c64a663 100644 --- a/src/ThermalFunctions/CMakeLists.txt +++ b/src/ThermalFunctions/CMakeLists.txt @@ -13,4 +13,4 @@ add_library(ThermalFunctions ${header} ${src}) target_link_libraries(ThermalFunctions PUBLIC GSL::gsl) target_include_directories(ThermalFunctions PUBLIC ${BSMPT_SOURCE_DIR}/include) -target_compile_features(ThermalFunctions PUBLIC cxx_std_14) +target_compile_features(ThermalFunctions PUBLIC cxx_std_17) diff --git a/src/WallThickness/CMakeLists.txt b/src/WallThickness/CMakeLists.txt index ac200a60..a7f7c330 100644 --- a/src/WallThickness/CMakeLists.txt +++ b/src/WallThickness/CMakeLists.txt @@ -13,4 +13,4 @@ target_link_libraries( LibWallThickness PUBLIC Eigen3::Eigen GSL::gsl Minimizer Utility Boost::boost Threads::Threads) target_include_directories(LibWallThickness PUBLIC ${BSMPT_SOURCE_DIR}/include) -target_compile_features(LibWallThickness PUBLIC cxx_std_14) +target_compile_features(LibWallThickness PUBLIC cxx_std_17) diff --git a/src/baryo_calculation/CMakeLists.txt b/src/baryo_calculation/CMakeLists.txt index dbe6705d..083a6bb6 100644 --- a/src/baryo_calculation/CMakeLists.txt +++ b/src/baryo_calculation/CMakeLists.txt @@ -34,4 +34,4 @@ target_link_libraries( Boost::boost) # target_compile_options(Baryo PUBLIC ${OpenMP_CXX_FLAGS}) target_include_directories(Baryo PUBLIC ${BSMPT_SOURCE_DIR}/include) -target_compile_features(Baryo PUBLIC cxx_std_14) +target_compile_features(Baryo PUBLIC cxx_std_17) diff --git a/src/minimizer/CMakeLists.txt b/src/minimizer/CMakeLists.txt index 2fb0ac3a..2d3712b1 100644 --- a/src/minimizer/CMakeLists.txt +++ b/src/minimizer/CMakeLists.txt @@ -41,4 +41,4 @@ endif() target_include_directories(Minimizer PUBLIC ${BSMPT_SOURCE_DIR}/include ${BSMPT_BINARY_DIR}/include) target_include_directories(Minimizer PUBLIC ${BSMPT_SOURCE_DIR}/include) -target_compile_features(Minimizer PUBLIC cxx_std_14) +target_compile_features(Minimizer PUBLIC cxx_std_17) diff --git a/src/utility/CMakeLists.txt b/src/utility/CMakeLists.txt index 213b4d42..6c6d969a 100644 --- a/src/utility/CMakeLists.txt +++ b/src/utility/CMakeLists.txt @@ -13,4 +13,4 @@ target_compile_features(Utility PUBLIC cxx_std_17) if(nlohmann_json_FOUND) target_link_libraries(Utility PRIVATE nlohmann_json::nlohmann_json) endif() -target_compile_features(Utility PUBLIC cxx_std_14) +target_compile_features(Utility PUBLIC cxx_std_17) diff --git a/tests/GenerateTestCompares/CMakeLists.txt b/tests/GenerateTestCompares/CMakeLists.txt index 77b548e0..05404078 100644 --- a/tests/GenerateTestCompares/CMakeLists.txt +++ b/tests/GenerateTestCompares/CMakeLists.txt @@ -8,6 +8,6 @@ set(header C2HDM.h R2HDM.h RN2HDM.h CPINTHEDARK.h CXSM.h) set(src C2HDM.cpp R2HDM.cpp RN2HDM.cpp CPINTHEDARK.cpp CXSM.cpp) add_library(TestCompares ${header} ${src}) -target_compile_features(TestCompares PUBLIC cxx_std_14) +target_compile_features(TestCompares PUBLIC cxx_std_17) target_link_libraries(TestCompares PRIVATE Minimizer) target_include_directories(TestCompares PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/tests/benchmarks/CMakeLists.txt b/tests/benchmarks/CMakeLists.txt index 16c8d1e3..457d48b1 100644 --- a/tests/benchmarks/CMakeLists.txt +++ b/tests/benchmarks/CMakeLists.txt @@ -17,7 +17,7 @@ if(benchmark_FOUND) target_link_libraries(benchmarks Minimizer Models Utility TestCompares ThermalFunctions) target_link_libraries(benchmarks benchmark::benchmark) - target_compile_features(benchmarks PUBLIC cxx_std_14) + target_compile_features(benchmarks PUBLIC cxx_std_17) if(BSMPTCompileBaryo) target_link_libraries(benchmarks Baryo) diff --git a/tests/catcheventlistener/CMakeLists.txt b/tests/catcheventlistener/CMakeLists.txt index 8ece00a2..5e2c9bc2 100644 --- a/tests/catcheventlistener/CMakeLists.txt +++ b/tests/catcheventlistener/CMakeLists.txt @@ -2,4 +2,4 @@ add_library(CatchEventListener catcheventlistener.cpp) target_link_libraries(CatchEventListener PRIVATE Utility Catch2::Catch2WithMain) target_include_directories(CatchEventListener INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -target_compile_features(CatchEventListener PUBLIC cxx_std_14) +target_compile_features(CatchEventListener PUBLIC cxx_std_17) diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index 825d6776..8da16b23 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -16,7 +16,7 @@ target_link_libraries( Utility TestCompares ThermalFunctions) -target_compile_features(GenericTests PUBLIC cxx_std_14) +target_compile_features(GenericTests PUBLIC cxx_std_17) include(Catch) catch_discover_tests(GenericTests)