[CMake] Cleanup version check for 2.8.12

Since we're always greater than 2.8.12, we don't need this check anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272219 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Bieneman 2016-06-08 22:48:01 +00:00
parent b6da4b89f3
commit 091ea8a7a1

View File

@ -496,27 +496,18 @@ function(llvm_add_library name)
get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
endif()
if(CMAKE_VERSION VERSION_LESS 2.8.12)
# Link libs w/o keywords, assuming PUBLIC.
target_link_libraries(${name}
${ARG_LINK_LIBS}
${lib_deps}
${llvm_libs}
)
elseif(ARG_STATIC)
target_link_libraries(${name} INTERFACE
${ARG_LINK_LIBS}
${lib_deps}
${llvm_libs}
)
if(ARG_STATIC)
set(libtype INTERFACE)
else()
# We can use PRIVATE since SO knows its dependent libs.
target_link_libraries(${name} PRIVATE
set(libtype PRIVATE)
endif()
target_link_libraries(${name} ${libtype}
${ARG_LINK_LIBS}
${lib_deps}
${llvm_libs}
)
endif()
if(LLVM_COMMON_DEPENDS)
add_dependencies(${name} ${LLVM_COMMON_DEPENDS})