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 AMICI_TRY_ENABLE_HDF5 env var #2148

Merged
merged 1 commit into from
Jul 20, 2023
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
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ cmake_minimum_required(VERSION 3.15)
project(amici)

# misc options
if(DEFINED ENV{AMICI_TRY_ENABLE_HDF5})
option(AMICI_TRY_ENABLE_HDF5 "Build with HDF5 support if available?"
$ENV{AMICI_TRY_ENABLE_HDF5})
else()
option(AMICI_TRY_ENABLE_HDF5 "Build with HDF5 support if available?" ON)
endif()
option(AMICI_PYTHON_BUILD_EXT_ONLY "Build only the Python extension?" OFF)
option(AMICI_TRY_ENABLE_HDF5 "Build with HDF5 support if available?" ON)
option(ENABLE_HDF5 "Build with HDF5 support?" OFF)
option(SUNDIALS_SUPERLUMT_ENABLE "Enable sundials SuperLUMT?" OFF)
option(EXPORT_PACKAGE "Export AMICI library to CMake package registry?" ON)
Expand Down Expand Up @@ -324,7 +329,10 @@ if(HDF5_FOUND)
target_link_libraries(${PROJECT_NAME} PUBLIC hdf5::hdf5_hl_cpp hdf5::hdf5_hl
hdf5::hdf5_cpp hdf5::hdf5)
else()
message(STATUS "HDF5 library NOT found. Building AMICI WITHOUT HDF5 support.")
message(
STATUS
"HDF5 support disabled or HDF5 library not found. Building AMICI WITHOUT HDF5 support."
)
endif()

if(AMICI_PYTHON_BUILD_EXT_ONLY)
Expand Down
4 changes: 4 additions & 0 deletions documentation/python_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ environment variables:
| | processes to be used for C(++) | |
| | compilation (defaults to 1) | |
+----------------------------+----------------------------------+---------------------------------+
| ``AMICI_TRY_ENABLE_HDF5`` | Whether to build AMICI with | ``AMICI_TRY_ENABLE_HDF5=OFF`` |
| | HDF5-support if possible. | |
| | Default: ``ON`` | |
+----------------------------+----------------------------------+---------------------------------+

Installation under Anaconda
---------------------------
Expand Down