[flang-commits] [flang] b8b752d - [flang][NFC] Create required Source dir for flang-doc. (#134000)
via flang-commits
flang-commits at lists.llvm.org
Thu Apr 3 10:43:52 PDT 2025
Author: Slava Zakharin
Date: 2025-04-03T10:43:49-07:00
New Revision: b8b752db2b89a730aff250a83b64c7ed10d95ca0
URL: https://github.com/llvm/llvm-project/commit/b8b752db2b89a730aff250a83b64c7ed10d95ca0
DIFF: https://github.com/llvm/llvm-project/commit/b8b752db2b89a730aff250a83b64c7ed10d95ca0.diff
LOG: [flang][NFC] Create required Source dir for flang-doc. (#134000)
Added:
Modified:
flang/docs/CMakeLists.txt
Removed:
################################################################################
diff --git a/flang/docs/CMakeLists.txt b/flang/docs/CMakeLists.txt
index 3e4883e881ffa..774fa4c745696 100644
--- a/flang/docs/CMakeLists.txt
+++ b/flang/docs/CMakeLists.txt
@@ -100,6 +100,15 @@ function (gen_rst_file_from_td output_file td_option source docs_target)
list(APPEND LLVM_TABLEGEN_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/../../clang/include/clang/Driver/")
clang_tablegen(Source/${output_file} ${td_option} SOURCE ${source} TARGET "gen-${output_file}")
add_dependencies(${docs_target} "gen-${output_file}")
+
+ # clang_tablegen() does not create the output directory automatically,
+ # so we have to create it explicitly. Note that copy-flang-src-docs below
+ # does create the output directory, but it is not necessarily run
+ # before RST generation.
+ add_custom_target(create-flang-rst-output-dir
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/Source
+ )
+ add_dependencies("gen-${output_file}" create-flang-rst-output-dir)
endfunction()
if (LLVM_ENABLE_SPHINX)
More information about the flang-commits
mailing list