Skip to content

Commit f4835b9

Browse files
committed
[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
1 parent 21c0e74 commit f4835b9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/cmake/modules/TableGen.cmake

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ function(tablegen project ofn)
88
message(FATAL_ERROR "${project}_TABLEGEN_EXE not set")
99
endif()
1010

11-
# Use depfile instead of globbing arbitrary *.td(s)
12-
# DEPFILE is available for Ninja Generator with CMake>=3.7.
13-
if(CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.7)
11+
# Use depfile instead of globbing arbitrary *.td(s) for Ninja.
12+
if(CMAKE_GENERATOR STREQUAL "Ninja")
1413
# Make output path relative to build.ninja, assuming located on
1514
# ${CMAKE_BINARY_DIR}.
1615
# CMake emits build targets as relative paths but Ninja doesn't identify
@@ -134,8 +133,8 @@ macro(add_tablegen target project)
134133
set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
135134
set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)
136135

137-
# CMake-3.9 doesn't let compilation units depend on their dependent libraries.
138-
if(NOT (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.9) AND NOT XCODE)
136+
# CMake doesn't let compilation units depend on their dependent libraries on some generators.
137+
if(NOT CMAKE_GENERATOR STREQUAL "Ninja" AND NOT XCODE)
139138
# FIXME: It leaks to user, callee of add_tablegen.
140139
set(LLVM_ENABLE_OBJLIB ON)
141140
endif()

0 commit comments

Comments
 (0)