[CMake] Target flags depending on compilation of another target

Alexander Neundorf a.neundorf-work at gmx.net
Sat Dec 29 09:23:09 EST 2007


On Friday 21 December 2007, Rodolfo Lima wrote:
> How can I set an executable compiler flags based on the result of the
> compilation of another target? Or, with another words, can I set a
> directory's COMPILER_FLAGS at build time?

Why do you need that at build time ?
If the lib is built in the same project, you can get the flags directly from 
there.
In all other cases it should be possible to write a cmake test to figure it 
out or to load a 3rd-party-project installed cmake file which contains the 
settings.

Alex


More information about the CMake mailing list