summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-05-20 16:56:17 +0000
committerReid Kleckner <reid@kleckner.net>2015-05-20 16:56:17 +0000
commit07b9501ee06baa31b703bc583c40b15968aca9a8 (patch)
tree6831289a56a3cf0501cbb747bc887b2ad1bf7a92 /CMakeLists.txt
parent04703c2499f2bec28a29f0bf1d9bbd824b46d985 (diff)
Silence some CMake 3.3 dev warnings in compiler-rt
Fix a trivial instance of CMP0054 that came up on llvmdev. The other warnings were CMP0057, which is about using the same file as a MAIN_DEPENDENCY multiple times. The old behavior hasn't been a problem yet, so I silenced the warning and filed PR23595 to document the issue if someone cares. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d8a88080..51620eb75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,12 @@ else()
if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
endif()
+ # PR23595: We use add_custom_command with the same MAIN_DEPENDENCY source file
+ # multiple times to compile for multiple architectures. CMake 3.3+ will error
+ # on this because it breaks some generators, but it hasn't been a problem yet.
+ if(POLICY CMP0057)
+ cmake_policy(SET CMP0057 OLD)
+ endif()
endif()
# Top level target used to build all compiler-rt libraries.