[PATCH] D57535: [CMake] Use LLVM_ENABLE_PROJECTS as the "single source" of truth when used.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 4 05:53:51 PST 2019


delcypher marked an inline comment as done.
delcypher added inline comments.


================
Comment at: CMakeLists.txt:154
+      STATUS
+      "Setting LLVM_TOOL_${upper_proj}_BUILD to ${SHOULD_ENABLE_PROJ}")
+    set(LLVM_TOOL_${upper_proj}_BUILD
----------------
smeenai wrote:
> delcypher wrote:
> > smeenai wrote:
> > > This will be pretty noisy ... is this a debugging leftover?
> > I agree that CMake's output in general is quite noisy. However this `STATUS` message is deliberate and is not a debugging leftover. I consider it to be quite useful to know what LLVM subprojects CMake actually intends to build.
> > 
> > There are also not that many LLVM subprojects.
> I don't see the utility personally. When I'm configuring, I already know which projects I've passed to `LLVM_ENABLE_PROJECTS`; I don't need CMake to explicitly tell me that it's enabling all those projects and disabling all other projects.
The utility is if you try passing something like `-DLLVM_TOOL_CLANG_BUILD=OFF` to CMake and in a previous CMake invocation you set `LLVM_ENABLE_PROJECTS` to something like `clang;compiler-rt`. In this case you'll see the message that clang is being enabled. This gives the user a way to see that `-DLLVM_TOOL_CLANG_BUILD=OFF` is being ignored. Admittedly this isn't very good because it's not shown as a warning but we can't really do any better (because we can't tell what the user's intention was).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57535/new/

https://reviews.llvm.org/D57535





More information about the llvm-commits mailing list