From b09269fff84d71a800e48d8bc0d8e0c38845291c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 26 Feb 2014 06:45:11 +0000 Subject: [CMake] Introduce cmake_policy(CMP0022) for target_link_libraries(INTERFACE|PRIVATE). For now, use both keywords, INTERFACE and PRIVATE via the variable, - ${cmake_2_8_12_INTERFACE} - ${cmake_2_8_12_PRIVATE} They could be cleaned up when we introduce 2.8.12. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202239 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3