Merge branch 'cmake_set_policy' into 'master'

Set cmake policy depending on cmake version

See merge request ngsolve/netgen!586
This commit is contained in:
Hochsteger, Matthias 2023-07-25 14:51:30 +02:00
commit 92902746cb

View File

@ -4,7 +4,10 @@ endif(NOT CMAKE_BUILD_TYPE)
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
cmake_policy(VERSION 3.13) cmake_policy(VERSION 3.13)
set(CMAKE_POLICY_DEFAULT_CMP0135 NEW) # DOWNLOAD_TIMESTAMP to extract date
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()
include (CMakeDependentOption) include (CMakeDependentOption)
option( USE_NATIVE_ARCH "build for native cpu architecture" ON) option( USE_NATIVE_ARCH "build for native cpu architecture" ON)