summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2015-02-23 19:15:08 +0000
committerChad Rosier <mcrosier@codeaurora.org>2015-02-23 19:15:08 +0000
commit3986322604e756eb762efd5a0610a58b206b62b3 (patch)
tree78c829c8a0753db719e9586c37741264aef6b948 /CMakeLists.txt
parentc38816e9d8039fe7b3148c17dc481ccdb7dcf75a (diff)
Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit 247aed4710e8befde76da42b27313661dea7cf66. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 441a08d6c0..27784c4489 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,14 +1,24 @@
# See docs/CMake.html for instructions about how to build LLVM with CMake.
-cmake_minimum_required(VERSION 2.8.12.2)
+cmake_minimum_required(VERSION 2.8.8)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Debug")
set(CMAKE_BUILD_TYPE "Debug")
endif()
-if(POLICY CMP0022)
- cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+# FIXME: It may be removed when we use 2.8.12.
+if(CMAKE_VERSION VERSION_LESS 2.8.12)
+ # Invalidate a couple of keywords.
+ set(cmake_2_8_12_INTERFACE)
+ set(cmake_2_8_12_PRIVATE)
+else()
+ # Use ${cmake_2_8_12_KEYWORD} intead of KEYWORD in target_link_libraries().
+ set(cmake_2_8_12_INTERFACE INTERFACE)
+ set(cmake_2_8_12_PRIVATE PRIVATE)
+ if(POLICY CMP0022)
+ cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+ endif()
endif()
if(CMAKE_VERSION VERSION_LESS 3.1.20141117)