mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.
Refactor to create AddCompileDefinitions.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user