[PATCH] D42490: [cmake] Set cmake policy CMP0068 to suppress warnings on OSX

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 09:00:29 PST 2018


hintonda created this revision.
hintonda added reviewers: beanz, compnerd, phosek, EricWF.
Herald added subscribers: cfe-commits, mgorny.

Set cmake policy CMP0068=NEW, if available -- depends on https://reviews.llvm.org/D42463 which
also adds target property "BUILD_WITH_INSTALL_NAME_DIR On" to maintain
current behavior.

This is needed to suppress warnings on OSX starting with cmake version
3.9.6.


Repository:
  rC Clang

https://reviews.llvm.org/D42490

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -1,5 +1,9 @@
 cmake_minimum_required(VERSION 3.4.3)
 
+if(POLICY CMP0068)
+  cmake_policy(SET CMP0068 NEW)
+endif()
+
 # If we are not building as a part of LLVM, build Clang as an
 # standalone project, using LLVM as an external library:
 if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42490.131285.patch
Type: text/x-patch
Size: 428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180124/a4160089/attachment.bin>


More information about the cfe-commits mailing list