From 659eb99ee1d734828a5ee77c27e41a190d8ffb6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Viana?= <57032457+vollous@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:53:19 +0100 Subject: [PATCH 1/5] Add options to Build.py --- Build.py | 8 +++++++- Setup.py | 10 +++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Build.py b/Build.py index c4882ce11..f4a2ad20d 100644 --- a/Build.py +++ b/Build.py @@ -28,8 +28,14 @@ def build(preset): def main(): + opts = Setup.parse_arguments() Setup.setup_profiles() - Setup.conan_install_all(Setup.BuildMode.release,build_missing=True) + print("The preset options is--------------------", opts.options) + Setup.conan_install_all(Setup.BuildMode.release, + opts.options if opts.options is not None else [], + build_missing=True, + custom_profile=opts.profile + ) build(get_preset()) if __name__ == "__main__": diff --git a/Setup.py b/Setup.py index a9129e571..3d33c5852 100644 --- a/Setup.py +++ b/Setup.py @@ -187,8 +187,7 @@ def __str__(self): return self.name -if __name__ == "__main__": - +def parse_arguments(): parser = ArgumentParser() parser.add_argument( "--mode", @@ -216,7 +215,12 @@ def __str__(self): default="", ) - opts = parser.parse_args() + return parser.parse_args() + + +if __name__ == "__main__": + + opts = parse_arguments() setup_profiles() conan_install_all( opts.mode, From 47c26db7407454a3d0024da2f0525caa4630c2b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Viana?= <57032457+vollous@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:55:05 +0100 Subject: [PATCH 2/5] Force CMake to refresh cache. Previously if you tried to recompile with different options nothing would happen. Needs cmake v3.24 --- Build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build.py b/Build.py index f4a2ad20d..354232712 100644 --- a/Build.py +++ b/Build.py @@ -20,7 +20,7 @@ def get_preset(): return preset def build(preset): - cmd=f"cmake --preset {preset}".split() + cmd=f"cmake --preset {preset} --fresh".split() subprocess.check_call(cmd) cmd=f"cmake --build --preset {preset}".split() From 8cd63fa2f93e2f0e7ea6d5fc75b38f0fada272f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Viana?= <57032457+vollous@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:56:35 +0100 Subject: [PATCH 3/5] Version bump --- CMakeLists.txt | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69312602c..6cd0def33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.23) project( BSMPT - VERSION 3.0.5 + VERSION 3.0.6 LANGUAGES C CXX DESCRIPTION "BSMPT - Beyond the Standard Model Phase Transitions : A C++ package for the computation of the EWPT in BSM models" diff --git a/README.md b/README.md index ba6b5960b..299b8e9a2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ SPDX-FileCopyrightText: 2021 Philipp Basler, Margarete Mühlleitner and Jonas M SPDX-License-Identifier: GPL-3.0-or-later --> -Program: BSMPT version 3.0.5 +Program: BSMPT version 3.0.6 Released by: Philipp Basler, Lisa Biermann, Margarete Mühlleitner, Jonas Müller, Rui Santos and João Viana From 5bef8bc6421525776b310f1e655dd98d58242abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Viana?= <57032457+vollous@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:15:54 +0100 Subject: [PATCH 4/5] Options syntax can be "-o [option1] -o [option2]" or "-o [option1] [option2]" --- Setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Setup.py b/Setup.py index 3d33c5852..d84fc2025 100644 --- a/Setup.py +++ b/Setup.py @@ -201,6 +201,7 @@ def parse_arguments(): "--options", "-o", nargs="+", + action="extend", help="Options to pass through to conan. For the available options please look into the conanfile.", ) parser.add_argument( From 6fa6f3936d4be29f2c3e998a34079231ee5b227a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Viana?= <57032457+vollous@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:16:09 +0100 Subject: [PATCH 5/5] Removed debugging line. --- Build.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Build.py b/Build.py index 354232712..ec3a902a2 100644 --- a/Build.py +++ b/Build.py @@ -30,7 +30,6 @@ def build(preset): def main(): opts = Setup.parse_arguments() Setup.setup_profiles() - print("The preset options is--------------------", opts.options) Setup.conan_install_all(Setup.BuildMode.release, opts.options if opts.options is not None else [], build_missing=True,