[CMake] Why do people need so much control over details of their build?

David.Karr at L-3COM.COM David.Karr at L-3COM.COM
Wed Mar 31 10:31:21 EDT 2010


I am a happy camper today ...

Brad King [mailto:brad.king at kitware.com] wrote:
> David.Karr at L-3COM.COM wrote:
> > The command-line-and-templates alternative (as implemented in the VS 6
> > generator) had at least three major benefits.
> 
> That design has been a PITA for years.

Oops.  I didn't realize it caused so much grief.  And certainly it would be even harder to do something like that in the later versions.  I'll forget that idea.

> I've been tempted to go back and
> re-implement the generator to drop use of templates.  If it weren't for
> all the embedded systems compilers that only exist as plugins to VS 6
> then we may have already dropped support for the generator.

No kidding!  My customer with all the questions about builds finally ditched VC6 this year, and I'm overjoyed about that.  I'd been rehearsing the upgrade with my CMake scripts since VS 7.1.

> The VS 10 generator finally solved this.  All the flag -> option mapping
> is automatically generated from xml files describing the options that
> come with the compiler.

That should make a lot of things easier for me.

> (1) AFAIK the <target>.idb file can be anywhere so long as it is in
> the same place every time the linker runs.  Correct?  Therefore we
> can hide it away in the <target>.dir/ directory in the build tree.

Sounds good.  That's where the .obj files go, right?  It's where I would expect to find the .idb.

> (2) Introduce a new setting similar to the runtime output directory:
> 
>   CMAKE_SYMBOL_OUTPUT_DIRECTORY[_<CONFIG>]
>         ^^^^^^ as in "debug symbol"; suggestions for name?
> 
> If set then it controls where .pdb files go and is ignored on other
> platforms.  It will need to be implemented for Makefiles (for NMake)
> and also for the VS IDE generators.

... And so, yet another one-off environment variable.  Sorry about that!  But it sounds like it would work.

(Just out of curiosity: wouldn't the '/PDB' option control this?  Did it go away in VS10?  Or is there something else I don't know about it?)

I'll take a look at cmTarget.  I appreciate the hints about how the patch ought to be done, so that I don't have to guess (probably badly) on my own.  Thanks!

David



More information about the CMake mailing list