summaryrefslogtreecommitdiffstats
path: root/compiler-rt
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
commitaa9029691ffabd26d49db66074aca3d84d95a2ae (patch)
tree708fd953d2acb8496b62f59db4f79c1b91fd76d3 /compiler-rt
parentc3e709e81fa4337acacc8a3b65c579478276d0ee (diff)
downloadbcm5719-llvm-aa9029691ffabd26d49db66074aca3d84d95a2ae.tar.gz
bcm5719-llvm-aa9029691ffabd26d49db66074aca3d84d95a2ae.zip
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. llvm-svn: 237808
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/CMakeLists.txt6
-rw-r--r--compiler-rt/cmake/Modules/CompilerRTUtils.cmake2
2 files changed, 7 insertions, 1 deletions
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 0d8a8808046..51620eb75f5 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/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.
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index 0fdb784525e..f7f60a4ac6f 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -52,7 +52,7 @@ endmacro()
macro(append_have_file_definition filename varname list)
check_include_file("${filename}" "${varname}")
- if (NOT "${varname}")
+ if (NOT ${varname})
set("${varname}" 0)
endif()
list(APPEND ${list} "${varname}=${${varname}}")
OpenPOWER on IntegriCloud