consolidate setting CMake policy CMP0074 into main cmake file
This commit is contained in:
@ -3,6 +3,11 @@
|
||||
# This file is part of LAMMPS
|
||||
# Created by Christoph Junghans and Richard Berger
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
########################################
|
||||
|
||||
project(lammps CXX)
|
||||
set(SOVERSION 0)
|
||||
|
||||
@ -6,10 +6,6 @@
|
||||
# TBB_MALLOC_FOUND - True if tbb found.
|
||||
#
|
||||
|
||||
# silence warning about ignoring <PackageName>_ROOT and use it.
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
########################################################
|
||||
# TBB Malloc
|
||||
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
enable_language(C)
|
||||
|
||||
# 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,11 +1,6 @@
|
||||
# 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"
|
||||
|
||||
# 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)
|
||||
|
||||
Reference in New Issue
Block a user