[clang] Allow installation of Clang .cfg files if they where generated. (PR #105580)
Vladimir Vereschaka via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 26 12:47:51 PDT 2024
https://github.com/vvereschaka updated https://github.com/llvm/llvm-project/pull/105580
>From b34482f4f9e1273f69d47b2d500989a5c3c857df Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka <vvereschaka at accesssoftek.com>
Date: Wed, 21 Aug 2024 13:37:47 -0700
Subject: [PATCH] Allow installation of Clang .cfg files if they where
generated.
Add 'install-clang-configs' target to install generated configuration
files into the destination 'bin' folder together with clang[++] executables.
---
clang/CMakeLists.txt | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index c6496167d3828b..f3494ab9e3f207 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -413,6 +413,22 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
endif()
endif()
+# Install build-generated Clang configuration files (if presented).
+install(DIRECTORY ${LLVM_BINARY_DIR}/bin/
+ TYPE BIN
+ COMPONENT clang-configs
+ FILES_MATCHING
+ PATTERN "*.cfg"
+ )
+add_custom_target(clang-configs DEPENDS clang)
+set_target_properties(clang-configs PROPERTIES FOLDER "Clang/Configurations")
+if(NOT LLVM_ENABLE_IDE)
+ # Add a dummy target so this can be used with LLVM_DISTRIBUTION_COMPONENTS.
+ add_llvm_install_targets(install-clang-configs
+ DEPENDS clang-configs
+ COMPONENT clang-configs)
+endif()
+
option(CLANG_BUILD_TOOLS
"Build the Clang tools. If OFF, just generate build targets." ON)
More information about the cfe-commits
mailing list