[CMake] Single-shot compilation

Alexander Neundorf a.neundorf-work at gmx.net
Thu Feb 18 15:16:29 EST 2010


On Wednesday 17 February 2010, Oliver Smith wrote:
> On systems that support it, I'm wanting to do the equivalent of:
>
>     $(CC) -pipe source1.cpp source2.cpp source3.cpp -fwhole-program
>
> I can't figure out how to tell CMake to pass multiple sources to the
> compiler at once.

If you really want that, you have to do that yourself.
In KDE we have a "KDE4_ENABLE_FINAL_FLAG", which creates one cpp file which 
includes all other cpp files and then only this one file is compiled.

Alex


More information about the CMake mailing list