[Openmp-commits] [PATCH] D82074: [OpenMP] Set cmake policy CMP0075 to NEW
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jun 18 02:09:01 PDT 2020
protze.joachim created this revision.
protze.joachim added a reviewer: AndreyChurbanov.
protze.joachim added a project: OpenMP.
Herald added subscribers: sstefan1, guansong, yaxunl, mgorny.
Herald added a reviewer: jdoerfert.
Building with cmake 3.16, I get the following warning:
CMake Warning (dev) at /usr/share/cmake-3.16/Modules/CheckIncludeFiles.cmake:120 (message):
Policy CMP0075 is not set: Include file check macros honor
CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
CMAKE_REQUIRED_LIBRARIES is set to:
m
For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
/home/jprotze/OMPD/llvm-project/openmp/runtime/cmake/config-ix.cmake:223 (check_include_files)
/home/jprotze/OMPD/llvm-project/openmp/runtime/CMakeLists.txt:223 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
The `cmake_minimum_required` command in the OpenMP directory overwrites the policy setting of llvm. Also, we want to support stand-alone builds, so we should set the policy.
lldb introduced the same patch in : https://reviews.llvm.org/D58279
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82074
Files:
openmp/CMakeLists.txt
Index: openmp/CMakeLists.txt
===================================================================
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+if(POLICY CMP0075)
+ 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.271604.patch
Type: text/x-patch
Size: 422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200618/0999f6e3/attachment.bin>
More information about the Openmp-commits
mailing list