[cmake-developers] need help for advanced option while additional build type

Brad King brad.king at kitware.com
Tue Jan 18 13:30:13 EST 2011


On 1/18/2011 12:19 PM, ajay bansal wrote:
> The problem is that include directories for both the configurations are
> different.

Currently per-configuration include_directories is not supported:

  http://public.kitware.com/Bug/view.php?id=6269

If you have just a few headers that need to be included on a
per-configuration basis you can work around the problem by
creating per-config COMPILE_DEFINITIONS:


http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:COMPILE_DEFINITIONS_CONFIG

Then create forwarding headers that include the real ones
by full path and switch among them based on the preprocessor
definitions.

-Brad



More information about the cmake-developers mailing list