update test for whether to set CMake policy CMP0074 is needed.
This commit is contained in:
@ -6,7 +6,8 @@
|
||||
# TBB_MALLOC_FOUND - True if tbb found.
|
||||
#
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
|
||||
# silence warning about ignoring <PackageName>_ROOT and use it.
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
########################################################
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
enable_language(C)
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
|
||||
# silence warning about ignoring <PackageName>_ROOT and use it.
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
|
||||
find_package(HDF5 REQUIRED)
|
||||
target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES})
|
||||
target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS})
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
# USER-NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
|
||||
# NetCDF library enables dump style "netcdf", while PNetCDF enables dump style "netcdf/mpiio"
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
|
||||
|
||||
# silence warning about ignoring <PackageName>_ROOT and use it.
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
|
||||
# may use NetCDF or PNetCDF with MPI, but must have NetCDF without
|
||||
if(NOT BUILD_MPI)
|
||||
find_package(NetCDF REQUIRED)
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user