[cmake-commits] hoffman committed cmGlobalXCodeGenerator.cxx 1.127
1.128
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Oct 13 11:53:15 EDT 2006
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv763/Source
Modified Files:
cmGlobalXCodeGenerator.cxx
Log Message:
ENH: allow for -gdwarf-2 to be in cflags or cxxflags for xcode
Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- cmGlobalXCodeGenerator.cxx 12 Oct 2006 21:19:57 -0000 1.127
+++ cmGlobalXCodeGenerator.cxx 13 Oct 2006 15:53:12 -0000 1.128
@@ -866,17 +866,11 @@
std::string::size_type pos = flags.find(flag);
if(pos != flags.npos)
{
- retFlag = flag;
- // remove the flag
- flags[pos]=' ';
- flags[pos+1]=' ';
- char pos2 = flags[pos+2];
- // if the pos after the option
- if(pos2 != ' ' && pos2 != 0 )
+ while(pos < flags.size() && flags[pos] != ' ')
{
- retFlag += pos2;
- // remove the next part of the flag
- flags[pos+2] = ' ';
+ retFlag += flags[pos];
+ flags[pos] = ' ';
+ pos++;
}
}
return retFlag;
@@ -1392,7 +1386,19 @@
optLevel[0] = '1';
}
std::string gflagc = this->ExtractFlag("-g", cflags);
+ // put back gdwarf-2 if used since there is no way
+ // to represent it in the gui, but we still want debug yes
+ if(gflagc == "-gdwarf-2")
+ {
+ cflags += " ";
+ cflags += gflagc;
+ }
std::string gflag = this->ExtractFlag("-g", flags);
+ if(gflag == "-gdwarf-2")
+ {
+ flags += " ";
+ flags += gflag;
+ }
const char* debugStr = "YES";
if(gflagc.size() ==0 && gflag.size() == 0)
{
More information about the Cmake-commits
mailing list