summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiguel A. Figueroa-Villanueva <miguelf@ieee.org>2010-05-09 17:27:58 (GMT)
committerMiguel A. Figueroa-Villanueva <miguelf@ieee.org>2010-05-09 17:27:58 (GMT)
commitf90bdaf38eb212ce41b542f7c4b2398ac4c2e01d (patch)
treed01a0aecae857533eff4a59b4a7b73eb4bb91226 /Modules
parent867efc0d453e686e3dd3791b45146755a068a35b (diff)
downloadCMake-f90bdaf38eb212ce41b542f7c4b2398ac4c2e01d.zip
CMake-f90bdaf38eb212ce41b542f7c4b2398ac4c2e01d.tar.gz
CMake-f90bdaf38eb212ce41b542f7c4b2398ac4c2e01d.tar.bz2
BUG #10209: Fixed FindwxWidget CXX flags parsing error.
Was not removing definition flags (-D...) from cxx flags, when the definition flag was last in the list returned from wx-config. --HG-- extra : rebase_source : 3452c52b92717f181e902abef38c1e2718ce3b27
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindwxWidgets.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 05c6625..85c6568 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -723,10 +723,13 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
- # parse definitions from cxxflags; drop -D* from CXXFLAGS and the -D prefix
+ # parse definitions from cxxflags;
+ # drop -D* from CXXFLAGS and the -D prefix
STRING(REGEX MATCHALL "-D[^;]+"
wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}")
- STRING(REGEX REPLACE "-D[^;]+;" ""
+ STRING(REGEX REPLACE "-D[^;]+(;|$)" ""
+ wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
+ STRING(REGEX REPLACE ";$" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
STRING(REPLACE "-D" ""
wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}")