building only libs with cmake

Hi!

is it possible to build only the libs (and no executables) with cmake?
I already have LLVM_BUILD_TOOLS:BOOL=OFF
and CLANG_BUILD_EXAMPLES:BOOL=OFF but things like Kaledoscope
are still built.

-Jochen

Jochen Wilhelmy <j.wilhelmy@arcor.de> writes:

is it possible to build only the libs (and no executables) with cmake?
I already have LLVM_BUILD_TOOLS:BOOL=OFF
and CLANG_BUILD_EXAMPLES:BOOL=OFF but things like Kaledoscope
are still built.

LLVM_BUILD_EXAMPLES=OFF

http://www.llvm.org/docs/CMake.html#llvmvars

Now I have -DLLVM_INCLUDE_EXAMPLES:BOOL=OFF
but Kaleidoscope is still there and selected for build
(-G "Visual Studio 9 2008")

-Jochen

Jochen Wilhelmy <j.wilhelmy@arcor.de> writes:

Now I have -DLLVM_INCLUDE_EXAMPLES:BOOL=OFF
but Kaleidoscope is still there and selected for build
(-G "Visual Studio 9 2008")

I just checked on VS 2010 and it removed the examples (including
Kaleidoscope) after reconfiguring with -DLLVM_INCLUDE_EXAMPLES=OFF.

Please check that:

1. LLVM_INCLUDE_EXAMPLES is not mistyped (see the CMakeCache.txt file)

2. The new VS files were reloaded by the IDE. (It asks some questions
after reconfiguring, and if you don't answer the right thing, you may
end with the old VS files.) For being 100% sure, close the solution,
reconfigure with LLVM_INCLUDE_EXAMPLES=OFF and re-open it.

If none of the above works, there is a bug on CMake.

Now I'm using LLVM_BUILD_EXAMPLES=OFF and I have

//Build LLVM example programs.
LLVM_BUILD_EXAMPLES:BOOL=OFF

in the cmakecache.txt file but it also does not seem to
work.
    
What that means? LLVM_BUILD_EXAMPLES shall create build targets for the
examples but do not build them when you build the ALL_BUILD target.
  
The targets are present (that's ok) but are selected for build in the configuration manager.

Jochen Wilhelmy <j.wilhelmy@arcor.de> writes:

Now I'm using LLVM_BUILD_EXAMPLES=OFF and I have

//Build LLVM example programs.
LLVM_BUILD_EXAMPLES:BOOL=OFF

in the cmakecache.txt file but it also does not seem to
work.
    
What that means? LLVM_BUILD_EXAMPLES shall create build targets for the
examples but do not build them when you build the ALL_BUILD target.
  
The targets are present (that's ok) but are selected for build in the
configuration manager.

AFAIK, on the IDE you must build the ALL_BUILD target only, unless you
want to compile everything. If you want more details, please ask on the
cmake ml.