[clang-tools-extra] [clang-doc] fix bug introduced by asset test (PR #97540)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 3 10:49:40 PDT 2024
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97540
>From b8dd4f6f2005d2e08ae13023905d0f36edd6348b Mon Sep 17 00:00:00 2001
From: PeterChou1 <peter.chou at mail.utoronto.ca>
Date: Wed, 3 Jul 2024 04:42:33 -0400
Subject: [PATCH 1/2] [clang-doc] fix path bug introduced by asset test
---
clang-tools-extra/clang-doc/tool/CMakeLists.txt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/clang-tools-extra/clang-doc/tool/CMakeLists.txt b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
index e93a5728d6b6b..3fd41f187a617 100644
--- a/clang-tools-extra/clang-doc/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
@@ -25,7 +25,11 @@ set(assets
)
set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
-set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
+if(MSVC)
+ set(resource_dir "${CMAKE_BINARY_DIR}/$<CONFIG>/share/clang-doc")
+else()
+ set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
+endif()
set(out_files)
function(copy_files_to_dst src_dir dst_dir file)
@@ -52,4 +56,4 @@ add_custom_target(copy-clang-doc-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)
+add_dependencies(clang-doc copy-clang-doc-assets)
\ No newline at end of file
>From cf993cfeeab18be6aa434e159fb625456183d4da Mon Sep 17 00:00:00 2001
From: PeterChou1 <peter.chou at mail.utoronto.ca>
Date: Wed, 3 Jul 2024 13:49:26 -0400
Subject: [PATCH 2/2] [clang-doc] modify cmake file to fix asset install path
---
clang-tools-extra/clang-doc/tool/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang-tools-extra/clang-doc/tool/CMakeLists.txt b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
index 3fd41f187a617..ddaf8cd4cdbd6 100644
--- a/clang-tools-extra/clang-doc/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
@@ -25,7 +25,7 @@ set(assets
)
set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
-if(MSVC)
+if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
set(resource_dir "${CMAKE_BINARY_DIR}/$<CONFIG>/share/clang-doc")
else()
set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
More information about the cfe-commits
mailing list