diff options
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 55d3c69..f049b4a 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -244,9 +244,23 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, << "\t\t\tCharacterSet=\"2\">\n"; fout << "\t\t\t<Tool\n" << "\t\t\t\tName=\"VCCLCompilerTool\"\n" - << "\t\t\t\tAdditionalOptions=\"" - << m_Makefile->GetDefinition("CMAKE_CXX_FLAGS") - << " -DCMAKE_INTDIR=\\"" << configName << "\\"" + << "\t\t\t\tAdditionalOptions=\""; + std::string flags; + if(target.HasCxx()) + { + flags = m_Makefile->GetDefinition("CMAKE_CXX_FLAGS"); + } + else + { + if(m_Makefile->GetDefinition("CMAKE_C_FLAGS")) + { + flags = m_Makefile->GetDefinition("CMAKE_C_FLAGS"); + } + } + cmSystemTools::ReplaceString(flags, "\"", """); + fout << flags; + + fout << " -DCMAKE_INTDIR=\\"" << configName << "\\"" << "\"\n"; fout << "\t\t\t\tAdditionalIncludeDirectories=\""; |