MantisBT - CMake
View Issue Details
0009168CMakeModulespublic2009-06-16 19:072016-06-10 14:30
gnu_lorien 
Miguel Figueroa 
normalminoralways
closedmoved 
CMake-2-6 
 
0009168: Bug with wxWidgets_CXX_FLAGS
I came across a problem when porting to another Unix platform today
with wxWidgets_CXX_FLAGS. There's a bug in how it parses and removes
definitions from wx-config's cxxflags output. I suspect this class of
bug applies to all pkg-config like and other gcc compile flags parsing
routines.

In essence, the following two regex replaces need to be included when
trying to remove definitions:
STRING(REGEX REPLACE ";-D[^;]+$" "" wxWidgets_CXX_FLAGS
"${wxWidgets_CXX_FLAGS}")
STRING(REGEX REPLACE "^-D[^;]+$" "" wxWidgets_CXX_FLAGS
"${wxWidgets_CXX_FLAGS}")

The first properly removes definitions that exist at the end of the
flags. The second properly removes a definition if it is the only
component of the C[XX]FLAGS.

I suspect a similar problem exists for includes when includes are the
only component of the flags.
No tags attached.
Issue History
2009-06-16 19:07gnu_lorienNew Issue
2009-06-17 12:19Miguel FigueroaStatusnew => assigned
2009-06-17 12:19Miguel FigueroaAssigned To => Miguel Figueroa
2010-07-20 05:29liberforceNote Added: 0021429
2010-08-28 12:15Kovarththanan RajaratnamCategoryCMake => Modules
2016-06-10 14:27Kitware RobotNote Added: 0041569
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0021429)
liberforce   
2010-07-20 05:29   
I have the same problem with CMake 2.4.7 under mingw.
When replaced in the g++ command line, wxWidgets_CXX_FLAGS contains spurious '\ ' (backslash + space). I seems that spaces in wxWidgets_CXX_FLAGS are escaped when the variable is evaluated. However, these characters do not appear when the showing its content with the MESSAGE cmake command.
(0041569)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.