summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3af1f6aff..438a5bf04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,20 @@ else()
cmake_minimum_required(VERSION 2.8.12.1)
endif()
+# 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()
+
# Top level target used to build all compiler-rt libraries.
add_custom_target(compiler-rt ALL)