From: Matthias Maier Date: Thu, 19 May 2022 06:30:28 +0000 (-0500) Subject: CMake: Avoid a CMake policy warning X-Git-Tag: v9.4.0-rc1~196^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a38fe123aaaab737df4167ae3faa9dbdeb65ed44;p=dealii.git CMake: Avoid a CMake policy warning --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c8f55aa9e5..0ec82b9371 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,10 +43,17 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.3.0) CMAKE_POLICY(VERSION 3.3.0) IF("${CMAKE_VERSION}" VERSION_LESS "3.11" AND POLICY CMP0037) - # allow to override "test" target for quick tests + # Allow to override "test" target for quick tests. CMAKE_POLICY(SET CMP0037 OLD) ENDIF() +IF(POLICY CMP0075) + # Use CMAKE_REQUIRED_LIBRARIES also in include file checks. We set the + # policy to NEW explicitly in order to avoid spurious configure warnings. + CMAKE_POLICY(SET CMP0075 NEW) +ENDIF() + + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) #