[PATCH] Raising minimum required CMake version to 2.8.12.2.
Chris Bieneman
beanz at apple.com
Fri Feb 20 13:02:47 PST 2015
Hi chandlerc, aaron.ballman,
Based on the discussion on LLVMDev, LLVM is going to raise the minimum required CMake version to 2.8.12.2. These are the cooresponding changes to clang. It is not required for clang to move in lock step with LLVM, but it does simplify things.
LLVMDev thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-February/081966.html
http://reviews.llvm.org/D7797
Files:
CMakeLists.txt
examples/PrintFunctionNames/CMakeLists.txt
examples/analyzer-plugin/CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -1,17 +1,7 @@
cmake_minimum_required(VERSION 2.8.8)
-# 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()
+if(POLICY CMP0022)
+ cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
endif()
# If we are not building as a part of LLVM, build Clang as an
@@ -358,7 +348,7 @@
llvm_add_library(${name} ${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: examples/PrintFunctionNames/CMakeLists.txt
===================================================================
--- examples/PrintFunctionNames/CMakeLists.txt
+++ examples/PrintFunctionNames/CMakeLists.txt
@@ -12,7 +12,7 @@
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: examples/analyzer-plugin/CMakeLists.txt
===================================================================
--- examples/analyzer-plugin/CMakeLists.txt
+++ examples/analyzer-plugin/CMakeLists.txt
@@ -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
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7797.20429.patch
Type: text/x-patch
Size: 2203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150220/0c3464d8/attachment.bin>
More information about the cfe-commits
mailing list