-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang-doc][cmake] Copy assets to build directory #95185
[clang-doc][cmake] Copy assets to build directory #95185
Conversation
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
@llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) ChangesWhile we copy the asset files, like index.js, into the This patch copies the contents of the clang-doc/assets Full diff: https://github.com/llvm/llvm-project/pull/95185.diff 1 Files Affected:
diff --git a/clang-tools-extra/clang-doc/tool/CMakeLists.txt b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
index fb8317b272932..c2425747562b9 100644
--- a/clang-tools-extra/clang-doc/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
@@ -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
+ COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different "${CMAKE_CURRENT_SOURCE_DIR}/../assets" "${CMAKE_BINARY_DIR}/share/clang"
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../assets"
+ COMMENT "Copying Clang-Doc Assets"
+ )
+set_target_properties(copy-clang-doc-assets PROPERTIES FOLDER "Clang-Doc/Assets")
+add_dependencies(clang-doc copy-clang-doc-assets)
|
@petrhosek I'm pretty sure there's a better way to spell this, but I think we need something similar to properly test clang-doc w/o an install step. cc: @PeterChou1 |
Jeez. IDK what I've done w/ SPR to do this, but I apologize. |
While we copy the asset files, like index.js, into the correct location in the install step, tests do not have access to those resources in the build directory. This patch copies the contents of the clang-doc/assets directory into the build folder, so that they can be used in testing. Pull Request: llvm#95185
While we copy the asset files, like index.js, into the correct location in the install step, tests do not have access to those resources in the build directory. This patch copies the contents of the clang-doc/assets directory into the build folder, so that they can be used in testing. Pull Request: #95185
While we copy the asset files, like index.js, into the
correct location in the install step, tests do not have
access to those resources in the build directory.
This patch copies the contents of the clang-doc/assets
directory into the build folder, so that they can be
used in testing.