r272312 - [CMake] Cleaning up CMake feature gating on 2.8.12
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 9 14:29:55 PDT 2016
Author: cbieneman
Date: Thu Jun 9 16:29:55 2016
New Revision: 272312
URL: http://llvm.org/viewvc/llvm-project?rev=272312&view=rev
Log:
[CMake] Cleaning up CMake feature gating on 2.8.12
CMake 2.8.12 introduced interface libraries and some related policies. This removes the conditional block because we're now past 2.8.12.
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt
cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
cfe/trunk/examples/analyzer-plugin/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=272312&r1=272311&r2=272312&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu Jun 9 16:29:55 2016
@@ -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}
Modified: cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt?rev=272312&r1=272311&r2=272312&view=diff
==============================================================================
--- cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt (original)
+++ cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt Thu Jun 9 16:29:55 2016
@@ -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
Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt?rev=272312&r1=272311&r2=272312&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt (original)
+++ cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt Thu Jun 9 16:29:55 2016
@@ -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
Modified: cfe/trunk/examples/analyzer-plugin/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/analyzer-plugin/CMakeLists.txt?rev=272312&r1=272311&r2=272312&view=diff
==============================================================================
--- cfe/trunk/examples/analyzer-plugin/CMakeLists.txt (original)
+++ cfe/trunk/examples/analyzer-plugin/CMakeLists.txt Thu Jun 9 16:29:55 2016
@@ -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
More information about the cfe-commits
mailing list