summaryrefslogtreecommitdiff
path: root/Source/cmTargetCompileDefinitionsCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTargetCompileDefinitionsCommand.cxx')
-rw-r--r--Source/cmTargetCompileDefinitionsCommand.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx
index d159d4178..4e716dc1f 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)
{
@@ -42,7 +33,7 @@ std::string cmTargetCompileDefinitionsCommand::Join(
std::string defs;
std::string sep;
for (std::string const& it : content) {
- if (cmHasLiteralPrefix(it.c_str(), "-D")) {
+ if (cmHasLiteralPrefix(it, "-D")) {
defs += sep + it.substr(2);
} else {
defs += sep + it;
@@ -56,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.
}