Excluding project builds

I'm learning the cmake build.

Is there a way to disable the build of a subdirectory in llvm/projects?
I'm getting a build error on one project and don't want it to hold up
the build of everything else.

Thanks!

                         -David

In your LLVM build directory run

$ cmake -DLLVM_BUILD_EXAMPLES=OFF /path/to/llvm/source

(note if you are using the makefile build you can run ``make
edit_cache`` to do the above).

If you are still having problems you could also set
LLVM_INCLUDE_EXAMPLES to OFF.

If you use ccmake or cmake gui these options are easily visibile,
you'll see a whole bunch of other useful options.

HTH,
Dan

Dan Liew <dan@su-root.co.uk> writes:

I'm learning the cmake build.

Is there a way to disable the build of a subdirectory in llvm/projects?
I'm getting a build error on one project and don't want it to hold up
the build of everything else.

In your LLVM build directory run

$ cmake -DLLVM_BUILD_EXAMPLES=OFF /path/to/llvm/source

(note if you are using the makefile build you can run ``make
edit_cache`` to do the above).

If you are still having problems you could also set
LLVM_INCLUDE_EXAMPLES to OFF.

If you use ccmake or cmake gui these options are easily visibile,
you'll see a whole bunch of other useful options.

I'm wondering about things like clang, lldb, etc. that are checked out
in llvm's projects directory. Is there a way to skip building one of
them? The lldb build is failing due to an ancient libc I can't replace.

Yeah, I can just delete the directory but for various reasons it's more
attractive not to have to do that. It would be nice to just tell CMake
not to build that directory via a CMake variable or at build config
time.

                            -David

How about “LLVM_EXTERNAL_*_BUILD=OFF”?

How about "LLVM_EXTERNAL_*_BUILD=OFF”?

This option actually doesn’t work well. In order to have the setting stick you need to run CMake twice. That was one of the bugs addressed in the patches you reverted last night.

Dan Liew <dan@su-root.co.uk> writes:

I’m learning the cmake build.

Is there a way to disable the build of a subdirectory in llvm/projects?
I’m getting a build error on one project and don’t want it to hold up
the build of everything else.

In your LLVM build directory run

$ cmake -DLLVM_BUILD_EXAMPLES=OFF /path/to/llvm/source

(note if you are using the makefile build you can run make edit_cache to do the above).

If you are still having problems you could also set
LLVM_INCLUDE_EXAMPLES to OFF.

If you use ccmake or cmake gui these options are easily visibile,
you’ll see a whole bunch of other useful options.

I’m wondering about things like clang, lldb, etc. that are checked out
in llvm’s projects directory. Is there a way to skip building one of
them? The lldb build is failing due to an ancient libc I can’t replace.

Do you mean “projects” or “tools”. clang, lldb, and lld should be in the tools directory not the projects directory. Those two directories have different build orders and are not inter-changable.

-Chris