Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.

Refactor to create AddCompileDefinitions.
This commit is contained in:
Stephen Kelly
2013-06-06 18:13:35 +02:00
parent afc9243c32
commit 184121538c
14 changed files with 54 additions and 48 deletions

View File

@@ -621,19 +621,15 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
->GetGeneratorTarget(target);
// the compilerdefines for this target
std::string cdefs = target->GetCompileDefinitions(buildType);
std::vector<std::string> cdefs;
target->GetCompileDefinitions(cdefs, buildType);
if(!cdefs.empty())
// Expand the list.
for(std::vector<std::string>::const_iterator di = cdefs.begin();
di != cdefs.end(); ++di)
{
// Expand the list.
std::vector<std::string> defs;
cmSystemTools::ExpandListArgument(cdefs.c_str(), defs);
for(std::vector<std::string>::const_iterator di = defs.begin();
di != defs.end(); ++di)
{
cmXMLSafe safedef(di->c_str());
fout <<" <Add option=\"-D" << safedef.str() << "\" />\n";
}
cmXMLSafe safedef(di->c_str());
fout <<" <Add option=\"-D" << safedef.str() << "\" />\n";
}
// the include directories for this target