CMake: CMP0075 requires CMake >= 3.12.

The presence of cmake_policy(CMP0075 required CMake >=3.12, and
errors with older CMake. Since older versions of CMake than 3.12
are already broken with NetCDF and uncommon nowadays, it may be
better to explicitly require 3.12 or newer.
This commit is contained in:
Michael Hirsch 2022-02-07 11:14:57 -05:00
parent 46149b2d75
commit 1c607a1e6c
No known key found for this signature in database
GPG Key ID: 6D23CDADAB0294F9

View File

@ -7,15 +7,17 @@
##################################
#Minimum required CMake Version
cmake_minimum_required(VERSION 3.6.1)
cmake_minimum_required(VERSION 3.12.0)
# CMake 3.12: Use libraries specified in CMAKE_REQUIRED_LIBRARIES for check include macros
#Project Name
project(netCDF LANGUAGES C CXX)
project(netCDF
LANGUAGES C CXX
HOMEPAGE_URL "https://www.unidata.ucar.edu/software/netcdf/"
DESCRIPTION "NetCDF is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data."
)
set(PACKAGE "netCDF" CACHE STRING "")
# Use libraries specified in CMAKE_REQUIRED_LIBRARIES for check include macros
cmake_policy(SET CMP0075 NEW)
#####
# Version Info:
#