From 107e01c8dc6b4890749b9fb3fe249a21787c00d3 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 12 Oct 2006 10:57:36 -0400 Subject: [PATCH] ENH: fix for bug -gdwarf getting removed --- Source/cmGlobalXCodeGenerator.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 319f460b9..d685c176b 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -866,6 +866,10 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag, std::string::size_type pos = flags.find(flag); if(pos != flags.npos) { + if(flags[pos + strlen(flag)] != ' ') + { + return flags; + } retFlag = flag; // remove the flag flags[pos]=' ';