[CMake] Support for -D prefixed compiler flags

Patrick McMunn doctorwhoguy at gmail.com
Wed Feb 20 00:39:58 EST 2013


I'm not 100% sure this is a cmake bug or if this is even the place to
report it, but I ran into a bug as described here:
http://www.gccxml.org/Bug/view.php?id=11069 It seems that cmake gives an
error when checking the compiler flags needed for a library. The library
has, depending on the particular system's configuration, possible one or
two compiler flags prefixed with -D such as -D_REENTRANT or -DQT_SHARED.
cmake thinks that these are cmake parameters rather than compiler flags,
and this causes an error. The current workaround appears to be to add =1 so
that the compiler flag becomes, for example, -D_RENTRANT=1. cmake is happy
with this, and it looks like gcc accepts it without complaint, but it
requires a specific workaround for each problematic compiler flag. Is this
a cmake bug that should be fixed or perhaps something that needs to be
changed with the compiz cmake setup?

-- 
Patrick McMunn

- Learn more about the Catholic Faith: http://www.catholic.com/
- Pray with the Church: http://www.universalis.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130219/59d8efdc/attachment.htm>


More information about the CMake mailing list