diff options
author | Don Hinton <hintonda@gmail.com> | 2018-01-25 04:55:18 +0000 |
---|---|---|
committer | Don Hinton <hintonda@gmail.com> | 2018-01-25 04:55:18 +0000 |
commit | b4cbf181f050dbe7cf1cfc4b174b856fe936a243 (patch) | |
tree | 734194203e909a39fee0da18719ee3d64c8a38a1 /CMakeLists.txt | |
parent | 6fa3a74335537c73aa8beff16cc5d9ff8ed30b34 (diff) |
[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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
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() |