diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e2ee3a5aaa..3718d95829 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -855,13 +855,15 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "EXPORT_NAME" && this->IsImported()) { + } + if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" << this->Name << "\")\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "SOURCES" && this->IsImported()) { + } + if (prop == "SOURCES" && this->IsImported()) { std::ostringstream e; e << "SOURCES property can't be set on imported targets (\"" << this->Name << "\")\n"; @@ -935,13 +937,15 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "EXPORT_NAME" && this->IsImported()) { + } + if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" << this->Name << "\")\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "SOURCES" && this->IsImported()) { + } + if (prop == "SOURCES" && this->IsImported()) { std::ostringstream e; e << "SOURCES property can't be set on imported targets (\"" << this->Name << "\")\n"; |