We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db16477 commit ef56653Copy full SHA for ef56653
1 file changed
examples/CMakeLists.txt
@@ -7,6 +7,13 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
7
## match hdf5 versioning x.x.x.h5cpp-version
8
project(h5cpp-examples VERSION 1.10.4.5 LANGUAGES CXX C)
9
10
+# Honor <PackageName>_ROOT (CMP0074, CMake 3.12+). The cmake_minimum_required
11
+# above predates it, so without this find_package(HDF5) below would silently
12
+# ignore the HDF5_ROOT we build for custom HDF Group installs. (#295)
13
+if(POLICY CMP0074)
14
+ cmake_policy(SET CMP0074 NEW)
15
+endif()
16
+
17
# check if the correct version of hdf5 available
18
set(H5CPP_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
19
0 commit comments