diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-22 04:54:34 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-22 04:54:34 (GMT) |
commit | 2a48ce12b19a7b31a550956e22efa74db7c20b4e (patch) | |
tree | 1490f167c83da31d28bb5a1974e3c626fb0de774 | |
parent | fc68dd61c32ec47e6dc19c322ea900092a6e30e2 (diff) | |
download | CMake-2a48ce12b19a7b31a550956e22efa74db7c20b4e.zip CMake-2a48ce12b19a7b31a550956e22efa74db7c20b4e.tar.gz CMake-2a48ce12b19a7b31a550956e22efa74db7c20b4e.tar.bz2 |
add support for CMAKE_C_FLAGS and handle quotes in CMAKE_CXX_FLAGS
-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=\""; |