From b4cbf181f050dbe7cf1cfc4b174b856fe936a243 Mon Sep 17 00:00:00 2001 From: Don Hinton Date: Thu, 25 Jan 2018 04:55:18 +0000 Subject: [cmake] Set cmake policy CMP0068 to suppress warnings on OSX Set cmake policy CMP0068=NEW, if available, and set "CMAKE_BUILD_WITH_INSTALL_NAME_DIR=On" globally to maintain current behavior. This is needed to suppress warnings on OSX starting with cmake version 3.9.6. Differential Revision: https://reviews.llvm.org/D42463 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323404 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 198dbff3144..12c47b2cd6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,11 @@ cmake_policy(SET CMP0056 NEW) cmake_policy(SET CMP0057 NEW) +if(POLICY CMP0068) + cmake_policy(SET CMP0068 NEW) + set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON) +endif() + if(NOT DEFINED LLVM_VERSION_MAJOR) set(LLVM_VERSION_MAJOR 7) endif() -- cgit v1.2.3