[CMake] granular preprocessor defiitions
Christoph Anton Mitterer
calestyo at scientia.net
Fri Apr 6 22:15:41 EDT 2012
>These days you can set the COMPILE_DEFINITIONS property on a
> per-directory,
...
>CMake 2.8.8 adds support for per-target INCLUDE_DIRECTORIES.
One addition:
Wouldn't it then make sense to also have a (or several, one for static,
one for dynamic) properties, that define the libraries to be linked
against each target/dir/source file, where the one for target is
automatically set by target_link_libraries.
The properties for source_files/dirs would just add the library to
anything (any executable or lib) that uses the respective sourcefile or
that is defined in the respective dir.
Of course the problem would remain on whether such properties should
have the platform independent library names, or the absolute paths in
them.
Cheers,
Chris.
More information about the CMake
mailing list