[libc-commits] [libc] [libc][docgen] regen docgen via cmake (PR #119628)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Wed Dec 11 15:03:18 PST 2024
https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/119628
None
>From f597df445af7e96c23e1a8538bfcf4860c49cd07 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Wed, 11 Dec 2024 15:02:54 -0800
Subject: [PATCH] [libc][docgen] regen docgen via cmake
---
libc/docs/CMakeLists.txt | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt
index be09423d38e8e3..c8e9bcd29f612c 100644
--- a/libc/docs/CMakeLists.txt
+++ b/libc/docs/CMakeLists.txt
@@ -4,6 +4,15 @@ include(AddSphinxTarget)
if (SPHINX_FOUND)
if (${SPHINX_OUTPUT_HTML})
add_sphinx_target(html libc)
+
+ list(APPEND docgen_list string strings)
+
+ foreach(stem IN LISTS docgen_list)
+ add_custom_target(${stem}_rst
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../utils/docgen/docgen.py ${stem}.h >
+ ${CMAKE_CURRENT_SOURCE_DIR}/headers/${stem}.rst)
+ add_dependencies(docs-libc-html ${stem}_rst)
+ endforeach()
endif()
endif()
endif()
More information about the libc-commits
mailing list