Skip to content

Commit 22800d6

Browse files
author
steven varga
committed
Merge remote-tracking branch 'origin/295-fix-cmp0074' into staging
2 parents c6e1401 + ef56653 commit 22800d6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

examples/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
77
## match hdf5 versioning x.x.x.h5cpp-version
88
project(h5cpp-examples VERSION 1.10.4.5 LANGUAGES CXX C)
99

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+
1017
# check if the correct version of hdf5 available
1118
set(H5CPP_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
1219

0 commit comments

Comments
 (0)