diff options
Diffstat (limited to 'Source/cmTargetCompileDefinitionsCommand.cxx')
-rw-r--r-- | Source/cmTargetCompileDefinitionsCommand.cxx | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx index 008d1a2..bd4121d 100644 --- a/Source/cmTargetCompileDefinitionsCommand.cxx +++ b/Source/cmTargetCompileDefinitionsCommand.cxx @@ -17,15 +17,6 @@ bool cmTargetCompileDefinitionsCommand::InitialPass( return this->HandleArguments(args, "COMPILE_DEFINITIONS"); } -void cmTargetCompileDefinitionsCommand::HandleImportedTarget( - const std::string& tgt) -{ - std::ostringstream e; - e << "Cannot specify compile definitions for imported target \"" << tgt - << "\"."; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); -} - void cmTargetCompileDefinitionsCommand::HandleMissingTarget( const std::string& name) { @@ -41,12 +32,11 @@ std::string cmTargetCompileDefinitionsCommand::Join( { std::string defs; std::string sep; - for (std::vector<std::string>::const_iterator it = content.begin(); - it != content.end(); ++it) { - if (cmHasLiteralPrefix(it->c_str(), "-D")) { - defs += sep + it->substr(2); + for (std::string const& it : content) { + if (cmHasLiteralPrefix(it.c_str(), "-D")) { + defs += sep + it.substr(2); } else { - defs += sep + *it; + defs += sep + it; } sep = ";"; } @@ -57,5 +47,5 @@ bool cmTargetCompileDefinitionsCommand::HandleDirectContent( cmTarget* tgt, const std::vector<std::string>& content, bool, bool) { tgt->AppendProperty("COMPILE_DEFINITIONS", this->Join(content).c_str()); - return true; + return true; // Successfully handled. } |