summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2015-02-24 16:39:46 +0000
committerTobias Grosser <tobias@grosser.es>2015-02-24 16:39:46 +0000
commit2ca0ae2a24e4b3ad9a50b7192d854ed0c0ab7fc1 (patch)
tree499e2cd26239cbfee0620f02bcbccc41c234a170 /llvm
parenta709f3a5aef2c7f377e050c6e0d55d626938655e (diff)
downloadbcm5719-llvm-2ca0ae2a24e4b3ad9a50b7192d854ed0c0ab7fc1.tar.gz
bcm5719-llvm-2ca0ae2a24e4b3ad9a50b7192d854ed0c0ab7fc1.zip
Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit r230062. Debian stable (wheezy) ships still with cmake 2.8.9. The commit broke my LLVM/Polly buildbot, to my knowledge our only Linux+cmake buildbot. llvm-svn: 230343
Diffstat (limited to 'llvm')
-rw-r--r--llvm/CMakeLists.txt16
-rw-r--r--llvm/cmake/modules/LLVM-Config.cmake4
-rw-r--r--llvm/lib/DebugInfo/PDB/CMakeLists.txt2
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt2
-rw-r--r--llvm/tools/llvm-shlib/CMakeLists.txt2
5 files changed, 18 insertions, 8 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 441a08d6c03..27784c44892 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1,14 +1,24 @@
# See docs/CMake.html for instructions about how to build LLVM with CMake.
-cmake_minimum_required(VERSION 2.8.12.2)
+cmake_minimum_required(VERSION 2.8.8)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Debug")
set(CMAKE_BUILD_TYPE "Debug")
endif()
-if(POLICY CMP0022)
- cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+# 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(CMAKE_VERSION VERSION_LESS 3.1.20141117)
diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake
index bc0527f1db4..b24c12989fa 100644
--- a/llvm/cmake/modules/LLVM-Config.cmake
+++ b/llvm/cmake/modules/LLVM-Config.cmake
@@ -41,9 +41,9 @@ function(explicit_llvm_config executable)
llvm_map_components_to_libnames(LIBRARIES ${link_components})
get_target_property(t ${executable} TYPE)
if("x${t}" STREQUAL "xSTATIC_LIBRARY")
- target_link_libraries(${executable} INTERFACE ${LIBRARIES})
+ target_link_libraries(${executable} ${cmake_2_8_12_INTERFACE} ${LIBRARIES})
elseif("x${t}" STREQUAL "xSHARED_LIBRARY" OR "x${t}" STREQUAL "xMODULE_LIBRARY")
- target_link_libraries(${executable} PRIVATE ${LIBRARIES})
+ target_link_libraries(${executable} ${cmake_2_8_12_PRIVATE} ${LIBRARIES})
else()
# Use plain form for legacy user.
target_link_libraries(${executable} ${LIBRARIES})
diff --git a/llvm/lib/DebugInfo/PDB/CMakeLists.txt b/llvm/lib/DebugInfo/PDB/CMakeLists.txt
index ed8c67411d9..87e357e2f07 100644
--- a/llvm/lib/DebugInfo/PDB/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/PDB/CMakeLists.txt
@@ -73,4 +73,4 @@ add_llvm_library(LLVMDebugInfoPDB
${LIBPDB_ADDITIONAL_HEADER_DIRS}
)
-target_link_libraries(LLVMDebugInfoPDB INTERFACE "${LIBPDB_ADDITIONAL_LIBRARIES}")
+target_link_libraries(LLVMDebugInfoPDB ${cmake_2_8_12_INTERFACE} "${LIBPDB_ADDITIONAL_LIBRARIES}")
diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
index 4dbc2df4c74..1aac3ac7fdc 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
@@ -13,7 +13,7 @@ add_llvm_library(LLVMInterpreter
)
if( LLVM_ENABLE_FFI )
- target_link_libraries( LLVMInterpreter PRIVATE ${FFI_LIBRARY_PATH} )
+ target_link_libraries( LLVMInterpreter ${cmake_2_8_12_PRIVATE} ${FFI_LIBRARY_PATH} )
endif()
add_dependencies(LLVMInterpreter intrinsics_gen)
diff --git a/llvm/tools/llvm-shlib/CMakeLists.txt b/llvm/tools/llvm-shlib/CMakeLists.txt
index 08dafe13ae3..9a8cd4ad4b8 100644
--- a/llvm/tools/llvm-shlib/CMakeLists.txt
+++ b/llvm/tools/llvm-shlib/CMakeLists.txt
@@ -90,7 +90,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for el
set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
endif()
-target_link_libraries(LLVM PRIVATE ${LIB_NAMES})
+target_link_libraries(LLVM ${cmake_2_8_12_PRIVATE} ${LIB_NAMES})
add_dependencies(LLVM libLLVMExports)
OpenPOWER on IntegriCloud