From 2a48ce12b19a7b31a550956e22efa74db7c20b4e Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 21 Nov 2002 23:54:34 -0500 Subject: add support for CMAKE_C_FLAGS and handle quotes in CMAKE_CXX_FLAGS --- Source/cmLocalVisualStudio7Generator.cxx | 20 +++++++++++++++++--- 1 file 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\tGetDefinition("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=\""; -- cgit v0.12