diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-06-06 16:13:35 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-07-11 06:23:56 (GMT) |
commit | 184121538c2576b2113c0e256ecb0cd9ac354134 (patch) | |
tree | 20ed38bafe4ff886b00c0ff6160f45744465b3ac /Source/cmExtraCodeBlocksGenerator.cxx | |
parent | afc9243c325c37ac7364af12a10adffd7dd81d25 (diff) | |
download | CMake-184121538c2576b2113c0e256ecb0cd9ac354134.zip CMake-184121538c2576b2113c0e256ecb0cd9ac354134.tar.gz CMake-184121538c2576b2113c0e256ecb0cd9ac354134.tar.bz2 |
Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.
Refactor to create AddCompileDefinitions.
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index f6f4cef..dfbb1c0 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -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 |