[CMake][TableGen] Remove dead CMake version checks

LLVM requires CMake 3.13.4, so remove version checks that are dead code.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D87190
This commit is contained in:
Raul Tambre 2020-09-05 18:05:14 +03:00
parent 4a39e08b2a
commit 834639de3e

View File

@ -8,9 +8,8 @@ function(tablegen project ofn)
message(FATAL_ERROR "${project}_TABLEGEN_EXE not set")
endif()
# Use depfile instead of globbing arbitrary *.td(s)
# DEPFILE is available for Ninja Generator with CMake>=3.7.
if(CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.7)
# Use depfile instead of globbing arbitrary *.td(s) for Ninja.
if(CMAKE_GENERATOR STREQUAL "Ninja")
# Make output path relative to build.ninja, assuming located on
# ${CMAKE_BINARY_DIR}.
# CMake emits build targets as relative paths but Ninja doesn't identify
@ -134,8 +133,8 @@ macro(add_tablegen target project)
set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)
# CMake-3.9 doesn't let compilation units depend on their dependent libraries.
if(NOT (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.9) AND NOT XCODE)
# CMake doesn't let compilation units depend on their dependent libraries on some generators.
if(NOT CMAKE_GENERATOR STREQUAL "Ninja" AND NOT XCODE)
# FIXME: It leaks to user, callee of add_tablegen.
set(LLVM_ENABLE_OBJLIB ON)
endif()