]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Avoid a CMake policy warning 13757/head
authorMatthias Maier <tamiko@43-1.org>
Thu, 19 May 2022 06:30:28 +0000 (01:30 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 19 May 2022 19:36:47 +0000 (14:36 -0500)
CMakeLists.txt

index c8f55aa9e51b628334e54d7e6974cfdbfda3ec3a..0ec82b9371ed1ace8445d726a77dc476366778d9 100644 (file)
@@ -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/)
 
 #

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.