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

Specify cmake build types and require cmake-build-extension==0.6.0 #2445

Merged
merged 11 commits into from
May 16, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
cmake_build_type
dweindl committed May 14, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 6032590c9f19751a0463659f3b83d9717406109c
3 changes: 3 additions & 0 deletions python/sdist/amici/setup.template.py
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@ def get_extension() -> CMakeExtension:
else:
os.environ["CMAKE_BUILD_PARALLEL_LEVEL"] = "1"

debug_build = os.getenv("AMICI_DEBUG", "").lower() in ["1", "true"]

return CMakeExtension(
name="model_ext",
source_dir=os.getcwd(),
@@ -37,6 +39,7 @@ def get_extension() -> CMakeExtension:
"-DAMICI_PYTHON_BUILD_EXT_ONLY=ON",
f"-DPython3_EXECUTABLE={Path(sys.executable).as_posix()}",
],
cmake_build_type="Debug" if debug_build else "Release",
)


2 changes: 2 additions & 0 deletions python/sdist/setup.py
Original file line number Diff line number Diff line change
@@ -141,6 +141,7 @@ def get_extensions():
],
)
# AMICI
debug_build = os.getenv("AMICI_DEBUG", "").lower() in ["1", "true"]
amici_ext = CMakeExtension(
name="amici",
install_prefix="amici",
@@ -153,6 +154,7 @@ def get_extensions():
"-DAMICI_PYTHON_BUILD_EXT_ONLY=ON",
f"-DPython3_EXECUTABLE={Path(sys.executable).as_posix()}",
],
cmake_build_type="Debug" if debug_build else "Release",
)
# Order matters!
return [suitesparse_config, amd, btf, colamd, klu, sundials, amici_ext]