Skip to content

Added CMake options WITH_HDF5 and WITH_SQLite3#582

Open
anderkve wants to merge 2 commits intomasterfrom
build_without_hdf5
Open

Added CMake options WITH_HDF5 and WITH_SQLite3#582
anderkve wants to merge 2 commits intomasterfrom
build_without_hdf5

Conversation

@anderkve
Copy link
Copy Markdown
Collaborator

This PR fixes issue #581 by adding two new options WITH_HDF5 and WITH_SQLite3 to our CMake system. By default both options are set to True, which corresponds to the current behaviour (automatically looking for HDF5 and SQLite3 on the system). If the CMake option is set to False, the HDF5/SQLite3-based printers and readers are ditched from the build configuration.

If a user e.g. builds with WITH_HDF5=False and then tries to run GAMBIT with a YAML file configured to use a HDF5 printer, they get the following error message

ERROR: A problem has occurred in the printer utilities.
Inifile entry 'printer:"hdf5"' does not specify a valid printer! Please choose from one of the following:
  none
  sqlite
  ascii
  cout

Comment thread cmake/optional.cmake
endif()
else()
message("${BoldCyan} X No HDF5 C libraries found. Excluding hdf5printer and hdf5reader from GAMBIT configuration.${ColourReset}")
message("${BoldCyan} X HDF5 is disabled. Excluding hdf5printer and hdf5reader from GAMBIT configuration. Use -DWITH_MPI=ON to enable HDF5. ${ColourReset}")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Use -DWITH_HDF5=ON to enable HDF5. Simply copy paste error.

@ChrisJChang
Copy link
Copy Markdown
Collaborator

I've checked and it works, after changing the message, it can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants