[SPAM?][faked-from] [CMake] Re: WX debug DEFINITIONS

Brad King brad.king at kitware.com
Tue May 3 08:50:29 EDT 2005


Dekeyser, Kris wrote:
> 1. ADD_DEFINITIONS doesn't have a debug option. Rather unfortunate, I think. But there is a workaround. You can create an include file that has conditional #define statements based on the _DEBUG define. Then make sure your sources include this file first.

This is correct, there is no such option for ADD_DEFINITIONS.  There are 
two reasons why this is currently the case:

1.) The only reason the debug/release "options" work for linking 
libraries is because at some point in early CMake development it was 
added by a third party contributor.

2.) We rarely use ADD_DEFINITIONS in our own projects because we prefer 
the configured include file approach (it is less global).  Also you can 
just add -DMY_PROJ_DEBUG options to the build flags for a particular 
configuration (like CMAKE_CXX_FLAGS_DEBUG) to distinguish the 
configurations at preprocessing time.

Anyway it probably wouldn't hurt to add the feature.  Please submit this 
as a feature request here:

http://www.cmake.org/Bug

-Brad


More information about the CMake mailing list