Skip to content

Commit

Permalink
cmake_build_type
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed May 14, 2024
1 parent 847d748 commit 6032590
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/sdist/amici/setup.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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",
)


Expand Down
2 changes: 2 additions & 0 deletions python/sdist/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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]
Expand Down

0 comments on commit 6032590

Please sign in to comment.