[cfe-dev] Is it possible to update cmake build without running cmake again? (Noob clang warning)

Óscar Fuentes ofv at wanadoo.es
Tue Jan 18 05:48:17 PST 2011


Dawie Joubert <joubertdj at gmail.com>
writes:

[snip]

> The command I run is as follows:
> cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
> -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_BUILD_TESTS=ON
> -DLLVM_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DREQUIRES_RTTI=1 -G
> "Unix Makefiles" ..

-DREQUIRES_RTTI=1 works by chance. It is not intented to be used as a
configuration option. Why do you need it? What breaks if you omit it?

[snip]

> But when I do the SVN update on my source, cmake complains that I have
> changed some variables (even if I used the same instruction) and then
> when I run "make -j4" in the build directory it starts to compile from
> scratch everything (my argument is that if you guys added files, cmake
> needs to be informed of the new files ... right?)

Any modification to the cmake stuff (all those CMakeLists.txt, the
configured headers suchs as config.h.cmake and the files under cmake/)
will trigger a reconfiguration.

> ... not a "train-smash" though ... at the pace that clang/llvm is
> moving I would like to have the latest without source builds, and if
> possible only build and link the changes into the already compiled
> objects ...

This is how it should work and it is how it works for me. Please note
that changes on global header files happen often and LLVM/clang has a
very intrincate dependency graph, so it is quite common that an update
causes a large rebuild.

Just as a far-fetched possibility, check on the CMakeCache.txt file from
your build directory that LLVM_APPEND_VC_REV is set to OFF. Otherwise
every svn update that causes a reconfiguration will require a rebuild.

[snip]




More information about the cfe-dev mailing list