[cmake-developers] [Review Request] Topic wxWidgets-cflags

Richard Shaw hobbes1069 at gmail.com
Thu Aug 21 14:30:02 EDT 2014


This is a dead simple change but it's also my first commit so I figured I
would request a review.

All this commit does is make sure if multiple cflags are received from the
wx-config utility that it be converted back into a string so gcc doesn't
choke on it.

Since it's short enough I guess it would be useful to post the commit here:

commit 873ad28a305b718e09b97d9a287c0c5c162766c0
Author: Richard M. Shaw <hobbes1069 at gmail.com>
Date:   Thu Aug 21 12:45:42 2014 -0500

    Make sure cflags in UsewxWidgets are a string, not a list.

diff --git a/Modules/UsewxWidgets.cmake b/Modules/UsewxWidgets.cmake
index f2f260d..7c1f925 100644
--- a/Modules/UsewxWidgets.cmake
+++ b/Modules/UsewxWidgets.cmake
@@ -88,6 +88,8 @@ if   (wxWidgets_FOUND)
   endif()

   if   (wxWidgets_CXX_FLAGS)
+    # Flags are expected to be a string here, not a list.
+    string(REPLACE ";" " " wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
     MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
   endif()
--- end ---

Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140821/2ea21efb/attachment.html>


More information about the cmake-developers mailing list