[PATCH] D82159: Add a cmake warning when someone tries to configure clang-tools-extra without clang
Nathan James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 19 01:34:54 PDT 2020
njames93 created this revision.
njames93 added reviewers: klimek, chandlerc.
Herald added subscribers: llvm-commits, stephenneuendorffer, rriddle, mgorny.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
njames93 updated this revision to Diff 271953.
njames93 added a comment.
Fix incorrect quote location
clang-tools-extra targets wont be generated without clang being enabled, so to help users know why their build commands are failing emit a warning from cmake.
Still unsure if the correct behaviour would be to do what flang does and automatically enable its dependency - mlir.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82159
Files:
llvm/CMakeLists.txt
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -138,6 +138,9 @@
BOOL "Whether to build ${upper_proj} as part of LLVM" FORCE
)
endforeach()
+ if ("clang-tools-extra" IN_LIST LLVM_ENABLE_PROJECTS AND NOT "clang" IN_LIST LLVM_ENABLE_PROJECTS)
+ message(WARNING "'clang-tools-extra' is enabled, yet it depends on 'clang' which is disabled")
+ endif()
endif()
unset(SHOULD_ENABLE_PROJECT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82159.271953.patch
Type: text/x-patch
Size: 507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200619/8e043537/attachment.bin>
More information about the llvm-commits
mailing list