mstorsjo created this revision.
mstorsjo added reviewers: serge-sans-paille, sammccall, whisperity, 
aaron.ballman.
Herald added subscribers: carlosgalvezp, rnkovacs, xazax.hun, mgorny.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: clang-tools-extra.

This is similar to the LLVM_TABLEGEN, CLANG_TABLEGEN and
CLANG_PSEUDO_GEN variables.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129799

Files:
  clang-tools-extra/clang-tidy/misc/CMakeLists.txt


Index: clang-tools-extra/clang-tidy/misc/CMakeLists.txt
===================================================================
--- clang-tools-extra/clang-tidy/misc/CMakeLists.txt
+++ 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()


Index: clang-tools-extra/clang-tidy/misc/CMakeLists.txt
===================================================================
--- clang-tools-extra/clang-tidy/misc/CMakeLists.txt
+++ 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()
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to