1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

TableGen.cmake: Try to fix build breakage introduce in r305142.

LLVM_TABLEGEN_TARGET is undefined in clang standalone build.
STREQUAL cannot omit LHS. Then I saw an error;

  CMake Error at /path/to/install/llvm/lib/cmake/llvm/TableGen.cmake:40 (if):
      if given arguments:
        "STREQUAL" "/path/to/install/llvm/bin/llvm-tblgen.exe"
      Unknown arguments specified

llvm-svn: 305159
This commit is contained in:
NAKAMURA Takumi 2017-06-11 00:57:30 +00:00
parent c676ad0769
commit 510c2060fc

View File

@ -37,7 +37,7 @@ function(tablegen project ofn)
# https://cmake.org/Bug/view.php?id=15858
# We could always have just one dependency on both the target and
# the file, but these 2 cases would produce cleaner cmake files.
if (${${project}_TABLEGEN_TARGET} STREQUAL ${${project}_TABLEGEN_EXE})
if ("${${project}_TABLEGEN_TARGET}" STREQUAL "${${project}_TABLEGEN_EXE}")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
# Generate tablegen output in a temporary file.
COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}