[llvm] f4835b9 - [CMake][TableGen] Remove dead CMake version checks
Raul Tambre via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 00:59:15 PDT 2020
Author: Raul Tambre
Date: 2020-09-07T10:59:07+03:00
New Revision: f4835b94f2cfc89e430263d1807b118e0e937f4d
URL: https://github.com/llvm/llvm-project/commit/f4835b94f2cfc89e430263d1807b118e0e937f4d
DIFF: https://github.com/llvm/llvm-project/commit/f4835b94f2cfc89e430263d1807b118e0e937f4d.diff
LOG: [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
Added:
Modified:
llvm/cmake/modules/TableGen.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
index d58ee1de043f..5f07acc1f692 100644
--- a/llvm/cmake/modules/TableGen.cmake
+++ b/llvm/cmake/modules/TableGen.cmake
@@ -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()
More information about the llvm-commits
mailing list