Unverified Commit 16db223d authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

update test for whether to set CMake policy CMP0074 is needed.

parent ffaa77af
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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()
########################################################
+3 −1
Original line number Diff line number Diff line
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})
+5 −1
Original line number Diff line number Diff line
# 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()