On 04/13/2011 11:50 PM, klaas.holwerda wrote: > Hi, > > I use ADD_DEFINITIONS( ${wxWidgets_DEFINITIONS} ) to add flags for > compilation like this: > > set( wxWidgets_CXX_FLAGS ${wxWidgets_CXX_FLAGS} > -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ > -fexceptions -fno-pcc-struct-return > -fstrict-aliasing > -Wall #all warnings > -Wno-unused-variable > ) > > Now a user complains that those flags are added to CXX_FLAGS as well as > RC_FLAGS . > The first is right, the second is a problem for the resource compiler > windres.exe used in codeblocks IDE. > > What is the right way to set compiler flags for cpp sources and other > flags for the resource compiler? > > Or are the generated makefiles not correct?? > > Thanks, > > Klaas
If you think about the name of the function, adding anything but preprocessor definitions is just plain wrong. Append them to the CMAKE_CXX_FLAGS variable instead. Michael _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake