diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 62200ce548..c0913e67ab 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -130,7 +130,17 @@ void cmVisualStudioGeneratorOptions::SetVerboseMakefile(bool verbose) 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::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 diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index e27c5d3dc0..ab6b8cca29 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -28,7 +28,8 @@ public: ResourceCompiler, MasmCompiler, Linker, - FortranCompiler + FortranCompiler, + CSharpCompiler }; cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg, Tool tool, cmVS7FlagTable const* table,