add support for CMAKE_C_FLAGS and handle quotes in CMAKE_CXX_FLAGS
This commit is contained in:
parent
fc68dd61c3
commit
2a48ce12b1
|
@ -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=\"";
|
||||
|
|
Loading…
Reference in New Issue