llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang
            
<details>
<summary>Changes</summary>
This change is needed to be able to refer to TD files that are not stored in 
${CMAKE_CURRENT_SOURCE_DIR}.
--
Full diff: https://github.com/llvm/llvm-project/pull/66497.diff

1 Files Affected:

- (modified) clang/docs/CMakeLists.txt (+6-7) 


<pre>
diff --git a/clang/docs/CMakeLists.txt b/clang/docs/CMakeLists.txt
index 4163dd2d90ad5b3..a63823c63428288 100644
--- a/clang/docs/CMakeLists.txt
+++ b/clang/docs/CMakeLists.txt
@@ -91,10 +91,10 @@ endif()
 endif()
 
 function (gen_rst_file_from_td output_file td_option source docs_targets)
-  if (NOT EXISTS &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/${source}&amp;quot;)
-    message(FATAL_ERROR &amp;quot;Cannot find source file: ${source} in 
${CMAKE_CURRENT_SOURCE_DIR}&amp;quot;)
+  if (NOT EXISTS &amp;quot;${source}&amp;quot;)
+    message(FATAL_ERROR &amp;quot;Cannot find source file: ${source}&amp;quot;)
   endif()
-  get_filename_component(TABLEGEN_INCLUDE_DIR 
&amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/${source}&amp;quot; DIRECTORY)
+  get_filename_component(TABLEGEN_INCLUDE_DIR &amp;quot;${source}&amp;quot; 
DIRECTORY)
   list(APPEND LLVM_TABLEGEN_FLAGS 
&amp;quot;-I${TABLEGEN_INCLUDE_DIR}&amp;quot;)
   clang_tablegen(${output_file} ${td_option} SOURCE ${source} TARGET 
&amp;quot;gen-${output_file}&amp;quot;)
   foreach(target ${docs_targets})
@@ -138,10 +138,9 @@ if (LLVM_ENABLE_SPHINX)
     endif()
 
     # Generated files
-    gen_rst_file_from_td(AttributeReference.rst -gen-attr-docs 
../include/clang/Basic/Attr.td &amp;quot;${docs_targets}&amp;quot;)
-    gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs 
../include/clang/Basic/Diagnostic.td &amp;quot;${docs_targets}&amp;quot;)
-    gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs 
../include/clang/Driver/ClangOptionDocs.td &amp;quot;${docs_targets}&amp;quot;)
-
+    gen_rst_file_from_td(AttributeReference.rst -gen-attr-docs 
${CMAKE_CURRENT_SOURCE_DIR}/../include/clang/Basic/Attr.td 
&amp;quot;${docs_targets}&amp;quot;)
+    gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs 
${CMAKE_CURRENT_SOURCE_DIR}/../include/clang/Basic/Diagnostic.td 
&amp;quot;${docs_targets}&amp;quot;)
+    gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs 
${CMAKE_CURRENT_SOURCE_DIR}/../include/clang/Driver/ClangOptionDocs.td 
&amp;quot;${docs_targets}&amp;quot;)
     foreach(target ${docs_targets})
       add_dependencies(${target} copy-clang-rst-docs)
     endforeach()
</pre>
</details>


https://github.com/llvm/llvm-project/pull/66497
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to