← Back to team overview

kicad-developers team mailing list archive

Re: __WXDEBUG__

 

On 6/16/2010 1:26 PM, Dick Hollenbeck wrote:
> Wayne,
> 
> How are you defining this in your debug builds?
> I cannot see it in the CMake scripts.  Wanted to use wxLogDebug(), which
> I feel should be enabled by the build system on any Debug
> CMAKE_BUILD_TYPE, but it is not.
> 
> Seems to me that if CMAKE_BUILD_TYPE==Debug, then we should be defining
> __WXDEBUG__ in our build scripts automatically?
> 
> Or I can simply use my D() macro wrapping printf().

Unfortunately, whoever wrote FindwxWidgets.cmake did not honor the
CMAKE_BUILD_TYPE setting when finding the wxWidgets build files and
settings.  The Kicad version in CMakeModules appears to be slightly
modified copy of the one that ships with cmake.  You must define
-DwxWidgets_USE_DEBUG=ON in order to get FindwxWidgets to call wx-config
with --debug=yes flag which returns the appropriate compiler flags and
debug versions of libraries (on systems that support sh scripting).
Setting wxWidgets_USE_DEBUG=ON is not the most elegant solution but it
works.  We could modify our custom version of FindwxWidgets to honor the
CMAKE_BUILD_TYPE setting or we could file a bug report against cmake so
that FindwxWidgets.cmake honors the CMAKE_BUILD_TYPE setting.  I would
prefer that the cmake folks take care of this but we'll probably have to
modify our version until it's fixed up stream.

Wayne


> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



References