Unverified Commit 48a9e0d7 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

consolidate setting CMake policy CMP0074 into main cmake file

parent 16db223d
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -3,6 +3,11 @@
# This file is part of LAMMPS
# This file is part of LAMMPS
# Created by Christoph Junghans and Richard Berger
# Created by Christoph Junghans and Richard Berger
cmake_minimum_required(VERSION 3.10)
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)
project(lammps CXX)
set(SOVERSION 0)
set(SOVERSION 0)
+0 −4
Original line number Original line Diff line number Diff line
@@ -6,10 +6,6 @@
#  TBB_MALLOC_FOUND        - True if tbb found.
#  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
# TBB Malloc


+0 −5
Original line number Original line Diff line number Diff line
enable_language(C)
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)
find_package(HDF5 REQUIRED)
target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES})
target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES})
target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS})
target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS})
+0 −5
Original line number Original line Diff line number Diff line
# USER-NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
# 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"
# 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
# may use NetCDF or PNetCDF with MPI, but must have NetCDF without
if(NOT BUILD_MPI)
if(NOT BUILD_MPI)
  find_package(NetCDF REQUIRED)
  find_package(NetCDF REQUIRED)