[llvm] r305159 - TableGen.cmake: Try to fix build breakage introduce in r305142.

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 10 17:57:31 PDT 2017


Author: chapuni
Date: Sat Jun 10 19:57:30 2017
New Revision: 305159

URL: http://llvm.org/viewvc/llvm-project?rev=305159&view=rev
Log:
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

Modified:
    llvm/trunk/cmake/modules/TableGen.cmake

Modified: llvm/trunk/cmake/modules/TableGen.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=305159&r1=305158&r2=305159&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Sat Jun 10 19:57:30 2017
@@ -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}




More information about the llvm-commits mailing list