[clang-tools-extra] [clang-doc][cmake] Copy assets to build directory (PR #95187)
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 12 23:28:06 PDT 2024
================
@@ -25,3 +25,11 @@ install(FILES ../assets/clang-doc-default-stylesheet.css
install(FILES ../assets/index.js
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-doc)
+
+add_custom_target(copy-clang-doc-assets
----------------
petrhosek wrote:
We prefer having a rule per file since most systems don't have a reliable way to tell if the directory content has changed. The approach we usually use to to have one `add_custom_command` per file with a single `add_custom_target` that depends on all output files, see for example https://github.com/llvm/llvm-project/blob/092dbfaad257885692fa64559e9eb43a5c466798/libcxx/include/CMakeLists.txt#L1024-L1043 or https://github.com/llvm/llvm-project/blob/092dbfaad257885692fa64559e9eb43a5c466798/clang/lib/Headers/CMakeLists.txt
https://github.com/llvm/llvm-project/pull/95187
More information about the cfe-commits
mailing list