[cmake-developers] [CMake 0012377]: CMake misparses -g0 as enable debug
Mantis Bug Tracker
mantis at public.kitware.com
Mon Aug 1 10:17:00 EDT 2011
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=12377
======================================================================
Reported By: Johan Björk
Assigned To:
======================================================================
Project: CMake
Issue ID: 12377
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-08-01 10:17 EDT
Last Modified: 2011-08-01 10:17 EDT
======================================================================
Summary: CMake misparses -g0 as enable debug
Description:
cmGlobalXCodeGenerator.cpp missparses -g0 (disable debug) as ENABLE, see
following code:
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)
{
debugStr = "NO";
}
Steps to Reproduce:
Set -g0 in CXX or C flags.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-08-01 10:17 Johan Björk New Issue
======================================================================
More information about the cmake-developers
mailing list