[Openmp-commits] [PATCH] D82074: [OpenMP] Set cmake policies CMP0074 and CMP0075 to NEW

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 17 13:57:12 PDT 2020


protze.joachim updated this revision to Diff 278896.
protze.joachim retitled this revision from "[OpenMP] Set cmake policy CMP0075 to NEW" to "[OpenMP] Set cmake policies  CMP0074 and CMP0075 to NEW".
protze.joachim added a comment.

On a different system, I also get warnings for CMP0074.
The two policies were introduced with cmake 3.12. As long as we don't bump the required cmake version to at least 3.12, we need to set the policies.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82074/new/

https://reviews.llvm.org/D82074

Files:
  openmp/CMakeLists.txt


Index: openmp/CMakeLists.txt
===================================================================
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -1,5 +1,15 @@
 cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 
+if(POLICY CMP0074)
+  # Warning: Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
+  cmake_policy(SET CMP0074 NEW)
+endif()
+
+if(POLICY CMP0075)
+  # Warning: Policy CMP0075 is not set: Include file check macros honor
+  cmake_policy(SET CMP0075 NEW)
+endif()
+
 # Add cmake directory to search for custom cmake functions.
 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82074.278896.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200717/44b030fa/attachment.bin>


More information about the Openmp-commits mailing list