[Cmake] File and compiler specific flags?

Amitha Perera perera at cs.rpi.edu
Sun Aug 19 19:51:23 EDT 2001


On Mon, Aug 20, 2001 at 01:19:54AM +0200, Sebastien BARRE wrote:
> Sure it does (as said "it's working"), but it's not kept in the cache, thus 
> the next time you launch the GUI, the new value is not shown, although it 
> will be computed correctly, again. It's just a cosmetic pb, but it's one of 
> the Cmake confusing issue (to my opinion, of course).

I think _not_ appearing in the cache is the correct behaviour. If it
meant to be a global flag, then it should just be entered into the
cache GUI/file. I think the value of these on-the-fly option changes
is that you can do special tweaks that should not normally be
necessary, but are needed for specific pieces of the project. For
example, -ftemplate-depth-100 is needed to compile just one file in
vxl. A normal "user" shouldn't really need to know this; he would just
enter his build flags (-g -O5 for example), and the build system will
take care of this one special case.

If the value did appear in the case, the user would keep wondering why
this value keep appearing in the cache. A more extreme case is this:
some files cannot be compiled with optimization, because the compiler
fails to compile the file. Thus, for that file, one would want to
override the flags and put -O0. It would not do for this to appear in
the cache, and thus cause the whole project to be unoptimized.

Amitha.




More information about the CMake mailing list