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

Dawie Joubert joubertdj at gmail.com
Thu Jan 20 23:08:07 PST 2011


Oscar,

Thanks for the info, but I believe I have found the correct answer.
According to CMake in http://www.cmake.org/Wiki/CMake_Useful_Variables,
they indicated that should only set the compiler type once
(-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++), the subsequent
calls to cmake should not have those strings in as Cmake will delete
your whole cache and compile everything from scratch ... thus if you
want to compile Clang with Clang ... :) ... then you only configure it
once with the different compiler settings ... the subsequent calls
should exclude those settings as it handles the Cmake cache as a
reference versus the "changes" that SVN did ... now my builds are far
faster ... and I can enjoy the luxury of having a bleeding edge
Clang ...

Best regards Clang-devs ...

Enjoy ...

Dawie
 
According to cmake
----Original Message-----
From: Dawie Joubert <joubertdj at gmail.com>
Reply-to: joubertdj at gmail.com
To: cfe-dev at cs.uiuc.edu
Subject: Is it possible to update cmake build without running cmake
again? (Noob clang warning)
Date: Tue, 18 Jan 2011 08:16:23 +0200

Clang/LLVM

I am using Clang now for some time successfully with some of our
internal projects.
I always use cmake as the makefile generator (build system).
I always use clang to build clang ... :) ... before I install it I do
the "make clang-test" obviously ...

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" ..

It is currently working very nice, but for one small little annoying
problem, this is most likely a noob problem:
I see when you do a ".configure"  you can actually do a "make
update" ... and then only the changes gets compiled and iterated
through.
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?) ... 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 ...

PS. Clang totally rocks ... here is hoping that emacs and vim aren't the
the two only editors that will be using its "other" features ...

Best regards,

Dawie


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110121/055f7657/attachment.html>


More information about the cfe-dev mailing list