diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-08-12 17:47:22 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-08-12 17:47:22 (GMT) |
commit | 01348a1a4f7501523ff8567795aacb60eb1f3c0b (patch) | |
tree | d82aa13b9eb595f26c5b8738ff192a6fbc08e25a /CMakeLists.txt | |
parent | 57141e58885f3b070f5fd9c612dc5eb90ef488bc (diff) | |
download | hdf5-01348a1a4f7501523ff8567795aacb60eb1f3c0b.zip hdf5-01348a1a4f7501523ff8567795aacb60eb1f3c0b.tar.gz hdf5-01348a1a4f7501523ff8567795aacb60eb1f3c0b.tar.bz2 |
Use a STRING option for API version
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c46d95..02bd784 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -496,28 +496,25 @@ if (H5_HAVE_PARALLEL) endif () endif () -set (DEFAULT_API_VERSION "v18") +set (DEFAULT_API_VERSION "v110" CACHE STRING "Enable v1.10 API (v16, v18, v110)" FORCE) +set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112) #----------------------------------------------------------------------------- # Option to use 1.6.x API #----------------------------------------------------------------------------- -option (HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF) set (H5_USE_16_API_DEFAULT 0) -if (HDF5_USE_16_API_DEFAULT) +if (DEFAULT_API_VERSION MATCHES "v16") set (H5_USE_16_API_DEFAULT 1) - set (DEFAULT_API_VERSION "v16") endif () #----------------------------------------------------------------------------- # Option to use 1.8.x API #----------------------------------------------------------------------------- -option (HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF) -if (NOT HDF5_USE_16_API_DEFAULT AND NOT HDF5_USE_18_API_DEFAULT) - set (HDF5_USE_18_API_DEFAULT ON) +if (NOT DEFAULT_API_VERSION) + set (DEFAULT_API_VERSION "v18") endif () set (H5_USE_18_API_DEFAULT 0) -if (HDF5_USE_18_API_DEFAULT) +if (DEFAULT_API_VERSION MATCHES "v18") set (H5_USE_18_API_DEFAULT 1) - set (DEFAULT_API_VERSION "v18") endif () #----------------------------------------------------------------------------- |