diff --git a/clang-tools-extra/clang-tidy/misc/CMakeLists.txt b/clang-tools-extra/clang-tidy/misc/CMakeLists.txt --- a/clang-tools-extra/clang-tidy/misc/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/misc/CMakeLists.txt @@ -3,7 +3,13 @@ Support ) -if(LLVM_USE_HOST_TOOLS) +set(CLANG_MAKE_CONFUSABLE_TABLE "clang-make-confusable-table" CACHE + STRING "Host clang-make-confusable-table executable. Saves building if cross-compiling.") + +if(NOT CLANG_MAKE_CONFUSABLE_TABLE STREQUAL "clang-make-confusable-table") + set(make_confusable_table ${CLANG_MAKE_CONFUSABLE_TABLE}) + set(make_confusable_table_target ${CLANG_MAKE_CONFUSABLE_TABLE}) +elseif(LLVM_USE_HOST_TOOLS) build_native_tool(clang-make-confusable-table make_confusable_table) set(make_confusable_table_target "${make_confusable_table}") else()