[llvm-branch-commits] [clang-tools-extra] 5e4e882 - [clang-tidy] Add CLANG_TIDY_CONFUSABLE_CHARS_GEN cmake cache variable to avoid building when cross compiling
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 29 15:25:16 PDT 2022
Author: Martin Storsjö
Date: 2022-07-29T15:23:32-07:00
New Revision: 5e4e8822c4c4fe568607b4168ed2cf4cf559b4e8
URL: https://github.com/llvm/llvm-project/commit/5e4e8822c4c4fe568607b4168ed2cf4cf559b4e8
DIFF: https://github.com/llvm/llvm-project/commit/5e4e8822c4c4fe568607b4168ed2cf4cf559b4e8.diff
LOG: [clang-tidy] Add CLANG_TIDY_CONFUSABLE_CHARS_GEN cmake cache variable to avoid building when cross compiling
This is similar to the LLVM_TABLEGEN, CLANG_TABLEGEN and
CLANG_PSEUDO_GEN cmake cache variables.
Differential Revision: https://reviews.llvm.org/D129799
(cherry picked from commit dc95d0c525636aed53a3b38258efa2dff4c83edf)
Added:
Modified:
clang-tools-extra/clang-tidy/misc/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/misc/CMakeLists.txt b/clang-tools-extra/clang-tidy/misc/CMakeLists.txt
index ee8fe0b37fce..de76b4b00c36 100644
--- a/clang-tools-extra/clang-tidy/misc/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/misc/CMakeLists.txt
@@ -3,7 +3,13 @@ set(LLVM_LINK_COMPONENTS
Support
)
-if(LLVM_USE_HOST_TOOLS)
+set(CLANG_TIDY_CONFUSABLE_CHARS_GEN "clang-tidy-confusable-chars-gen" CACHE
+ STRING "Host clang-tidy-confusable-chars-gen executable. Saves building if cross-compiling.")
+
+if(NOT CLANG_TIDY_CONFUSABLE_CHARS_GEN STREQUAL "clang-tidy-confusable-chars-gen")
+ set(make_confusable_table ${CLANG_TIDY_CONFUSABLE_CHARS_GEN})
+ set(make_confusable_table_target ${CLANG_TIDY_CONFUSABLE_CHARS_GEN})
+elseif(LLVM_USE_HOST_TOOLS)
build_native_tool(clang-tidy-confusable-chars-gen make_confusable_table)
set(make_confusable_table_target "${make_confusable_table}")
else()
More information about the llvm-branch-commits
mailing list