]> granicus.if.org Git - clang/commitdiff
[CMake] Cleaning up CMake feature gating on 2.8.12
authorChris Bieneman <beanz@apple.com>
Thu, 9 Jun 2016 21:29:55 +0000 (21:29 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 9 Jun 2016 21:29:55 +0000 (21:29 +0000)
CMake 2.8.12 introduced interface libraries and some related policies. This removes the conditional block because we're now past 2.8.12.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272312 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
examples/AnnotateFunctions/CMakeLists.txt
examples/PrintFunctionNames/CMakeLists.txt
examples/analyzer-plugin/CMakeLists.txt

index fce82295508bb4f7ea0ba9bd706fbdedbc6899bc..40ba3fdd31a9604311ca34d04607a437d39dcb0c 100644 (file)
@@ -1,19 +1,5 @@
 cmake_minimum_required(VERSION 3.4.3)
 
-# 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 we are not building as a part of LLVM, build Clang as an
 # standalone project, using LLVM as an external library:
 if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
@@ -421,7 +407,7 @@ macro(add_clang_library name)
   llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
 
   if(TARGET ${name})
-    target_link_libraries(${name} ${cmake_2_8_12_INTERFACE} ${LLVM_COMMON_LIBS})
+    target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
 
     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
       install(TARGETS ${name}
index 10e16f254df22f19380aab7d2d1092d26e03ecbf..cf564d527d6a8f692599024eed62a4578c3d83ff 100644 (file)
@@ -1,7 +1,7 @@
 add_llvm_loadable_module(AnnotateFunctions AnnotateFunctions.cpp)
 
 if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
-  target_link_libraries(AnnotateFunctions ${cmake_2_8_12_PRIVATE}
+  target_link_libraries(AnnotateFunctions PRIVATE
     clangAST
     clangBasic
     clangFrontend
index e700281ab48999bb37dd880360fc083c1965e61f..5a00d5036fb1631be836365652f40851eece869c 100644 (file)
@@ -12,7 +12,7 @@ endif()
 add_llvm_loadable_module(PrintFunctionNames PrintFunctionNames.cpp)
 
 if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
-  target_link_libraries(PrintFunctionNames ${cmake_2_8_12_PRIVATE}
+  target_link_libraries(PrintFunctionNames PRIVATE
     clangAST
     clangBasic
     clangFrontend
index 1788d6c5cac96b7073152dee94e0e5870e7e8add..dcbe5c4e0e90e0c00c9c195da13e6d389188ef64 100644 (file)
@@ -1,7 +1,7 @@
 add_llvm_loadable_module(SampleAnalyzerPlugin MainCallChecker.cpp)
 
 if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
-  target_link_libraries(SampleAnalyzerPlugin ${cmake_2_8_12_PRIVATE}
+  target_link_libraries(SampleAnalyzerPlugin PRIVATE
     clangAnalysis
     clangAST
     clangStaticAnalyzerCore