VS: Teach option map IsDebug() method about C# projects

This commit is contained in:
Michael Stürmer
2016-12-07 12:48:49 +01:00
committed by Brad King
parent 0f37cd228e
commit e438693e95
2 changed files with 13 additions and 2 deletions

View File

@@ -130,7 +130,17 @@ void cmVisualStudioGeneratorOptions::SetVerboseMakefile(bool verbose)
bool cmVisualStudioGeneratorOptions::IsDebug() const bool cmVisualStudioGeneratorOptions::IsDebug() const
{ {
return this->FlagMap.find("DebugInformationFormat") != this->FlagMap.end(); if (this->CurrentTool != CSharpCompiler) {
return this->FlagMap.find("DebugInformationFormat") != this->FlagMap.end();
}
std::map<std::string, FlagValue>::const_iterator i =
this->FlagMap.find("DebugType");
if (i != this->FlagMap.end()) {
if (i->second.size() == 1) {
return i->second[0] != "none";
}
}
return false;
} }
bool cmVisualStudioGeneratorOptions::IsWinRt() const bool cmVisualStudioGeneratorOptions::IsWinRt() const

View File

@@ -28,7 +28,8 @@ public:
ResourceCompiler, ResourceCompiler,
MasmCompiler, MasmCompiler,
Linker, Linker,
FortranCompiler FortranCompiler,
CSharpCompiler
}; };
cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg, Tool tool, cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg, Tool tool,
cmVS7FlagTable const* table, cmVS7FlagTable const* table,