Skip to content

Commit

Permalink
resolve CMP0074 policy warnings downstream when importing installed c…
Browse files Browse the repository at this point in the history
…onduit
  • Loading branch information
cyrush committed Oct 19, 2020
1 parent de840b5 commit c90402a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/config/conduit_setup_deps.cmake
Expand Up @@ -34,6 +34,12 @@ if(CONDUIT_HDF5_DIR)
get_filename_component(HDF5_DIR_REAL "${HDF5_DIR}" REALPATH)
message(STATUS "Looking for HDF5 at: " ${HDF5_DIR_REAL})

if(POLICY CMP0074)
#policy for <PackageName>_ROOT variables
cmake_policy(PUSH)
cmake_policy(SET CMP0074 NEW)
endif()

# CMake's FindHDF5 module uses the HDF5_ROOT env var
set(HDF5_ROOT ${HDF5_DIR_REAL})

Expand All @@ -57,6 +63,11 @@ if(CONDUIT_HDF5_DIR)
${HDF5_DIR}/cmake)
endif()

if(POLICY CMP0074)
# clear CMP0074
cmake_policy(POP)
endif()

# FindHDF5/find_package sets HDF5_DIR to it's installed CMake info if it exists
# we want to keep HDF5_DIR as the root dir of the install to be
# consistent with other packages
Expand Down

0 comments on commit c90402a

Please sign in to comment.