Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options Build.py #158

Merged
merged 5 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Build.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@ 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()
subprocess.check_call(cmd)


def main():
opts = Setup.parse_arguments()
Setup.setup_profiles()
Setup.conan_install_all(Setup.BuildMode.release,build_missing=True)
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__":
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.23)
project(
BSMPT
VERSION 3.0.5
VERSION 3.0.6
phbasler marked this conversation as resolved.
Show resolved Hide resolved
LANGUAGES C CXX
DESCRIPTION
"BSMPT - Beyond the Standard Model Phase Transitions : A C++ package for the computation of the EWPT in BSM models"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
phbasler marked this conversation as resolved.
Show resolved Hide resolved

Released by: Philipp Basler, Lisa Biermann, Margarete Mühlleitner, Jonas Müller, Rui Santos and João Viana

Expand Down
11 changes: 8 additions & 3 deletions Setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ def __str__(self):
return self.name


if __name__ == "__main__":

def parse_arguments():
parser = ArgumentParser()
parser.add_argument(
"--mode",
Expand All @@ -202,6 +201,7 @@ def __str__(self):
"--options",
"-o",
nargs="+",
action="extend",
help="Options to pass through to conan. For the available options please look into the conanfile.",
)
parser.add_argument(
Expand All @@ -216,7 +216,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,
Expand Down