[cmake-developers] [PATCH 1/2] FindwxWidgets.cmake: Fix up wxWidgets_CXXFLAGS

Brad King brad.king at kitware.com
Tue Feb 16 10:50:03 EST 2016


On 02/14/2016 02:51 PM, Simon Richter wrote:
> This variable contains a semicolon-separated list, but a string of
> space-separated options is needed. As -I and -D options are separated out,
> this usually does not cause any trouble, unless more than one option is
> needed.
[snip]
> +        # Flags are a string, not a list, fix it here
> +        string(REPLACE ";" " "
> +          wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")

This was discussed here:

  https://cmake.org/Bug/view.php?id=15087#c36639

We cannot simply change the flags because existing code could be depending
on the old value.  We addressed it here instead as of CMake 3.1:

 UsewxWidgets: CFLAGS are expected to be a string here, not a list.
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6fa6e60

Uses in other projects simply need to be fixed.

-Brad


More information about the cmake-developers mailing list