This revision was automatically updated to reflect the committed changes.
Closed by commit rGc04eab8c78e5: [Flang] Use find_program() to find 
clang-tblgen (authored by nikic).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131475/new/

https://reviews.llvm.org/D131475

Files:
  clang/CMakeLists.txt
  flang/docs/CMakeLists.txt


Index: flang/docs/CMakeLists.txt
===================================================================
--- flang/docs/CMakeLists.txt
+++ flang/docs/CMakeLists.txt
@@ -126,7 +126,7 @@
         ARGS ${CMAKE_CURRENT_BINARY_DIR}/Source/FIR/CreateFIRLangRef.py)
 
       # CLANG_TABLEGEN_EXE variable needs to be set for clang_tablegen to run 
without error
-      set(CLANG_TABLEGEN_EXE clang-tblgen)
+      find_program(CLANG_TABLEGEN_EXE "clang-tblgen" ${LLVM_TOOLS_BINARY_DIR} 
NO_DEFAULT_PATH)
       gen_rst_file_from_td(FlangCommandLineReference.rst -gen-opt-docs 
FlangOptionsDocs.td docs-flang-html)
     endif()
     if (${SPHINX_OUTPUT_MAN})
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -484,6 +484,9 @@
 
 add_subdirectory(utils/TableGen)
 
+# Export CLANG_TABLEGEN_EXE for use by flang docs.
+set(CLANG_TABLEGEN_EXE "${CLANG_TABLEGEN_EXE}" CACHE INTERNAL "")
+
 add_subdirectory(include)
 
 # All targets below may depend on all tablegen'd files.


Index: flang/docs/CMakeLists.txt
===================================================================
--- flang/docs/CMakeLists.txt
+++ flang/docs/CMakeLists.txt
@@ -126,7 +126,7 @@
         ARGS ${CMAKE_CURRENT_BINARY_DIR}/Source/FIR/CreateFIRLangRef.py)
 
       # CLANG_TABLEGEN_EXE variable needs to be set for clang_tablegen to run without error
-      set(CLANG_TABLEGEN_EXE clang-tblgen)
+      find_program(CLANG_TABLEGEN_EXE "clang-tblgen" ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
       gen_rst_file_from_td(FlangCommandLineReference.rst -gen-opt-docs FlangOptionsDocs.td docs-flang-html)
     endif()
     if (${SPHINX_OUTPUT_MAN})
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -484,6 +484,9 @@
 
 add_subdirectory(utils/TableGen)
 
+# Export CLANG_TABLEGEN_EXE for use by flang docs.
+set(CLANG_TABLEGEN_EXE "${CLANG_TABLEGEN_EXE}" CACHE INTERNAL "")
+
 add_subdirectory(include)
 
 # All targets below may depend on all tablegen'd files.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D131475: [Flang]... Nikita Popov via Phabricator via cfe-commits

Reply via email to