On 04/12/2011 06:59 PM, damateem wrote:
>
> The only place "-fexceptions -fno-pcc-struct-return -fstrict-aliasing
> -Wall -Wno-unused-variable" shows up in cmake-gui is for wxDocview_FLAGS
> and wxWidgets_CXX_FLAGS.

In FindwxWidgets.cmake, i already make a seperation more or less.
-D like stuff and the other.

#  wxWidgets_DEFINITIONS      - Contains defines required to compile/link
#                               against WX, e.g. -DWXUSINGDLL
#  wxWidgets_CXX_FLAGS        - Include dirs and ompiler flags for
#                               unices, empty on WIN32. Esentially
#                               "`wx-config --cxxflags`".


Maybe just changing:

         DOCVIEW_ADD_DEFINITIONS( "${wxWidgets_CXX_FLAGS}" )
         DOCVIEW_ADD_DEFINITIONS( "${wxWidgets_DEFINITIONS}" )

and this:

MACRO( DOCVIEW_ADD_DEFINITIONS defines )
     FOREACH(d ${defines})
         ADD_DEFINITIONS( ${d} )
     ENDFOREACH(d ${defines})
     SET( wxDocview_FLAGS ${wxDocview_FLAGS} ${defines})
ENDMACRO( DOCVIEW_ADD_DEFINITIONS )

e.g instead of using ADD_DEFINITIONS, add it to CMAKE_CXX_FLAGS directly 
without using the command.

Something i do like in FindwxWidgets.cmake:

if ( ${CMAKE_GENERATOR} STREQUAL "MinGW Makefiles" )
     option( wxWidgets_MINGW_FROM_SOURCE  "Use wxWidgets source distribution 
instead of wxDevCpp 
devpack" ON)
     # remove the standard -O3 option, it does not work
     set( wxWidgets_FIND_STYLE "WIN32_STYLE_FIND" CACHE STRING "wxWidgets find 
style" FORCE )

     SET (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" CACHE STRING
         "Flags used by the compiler during release builds" FORCE)
     SET (CMAKE_C_FLAGS_RELEASE "-DNDEBUG" CACHE STRING
         "Flags used by the compiler during release builds" FORCE)

Can you try:

    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${d}" CACHE STRING
         "Flags used by the compiler during release builds" FORCE)

instead of:

     ADD_DEFINITIONS( ${d} )

see what happens.
I using linux at home, so more complicated to try via virtualbox.


Klaas


------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to