Commit ff91071a authored by Sebastian Holtermann's avatar Sebastian Holtermann

cmTarget: Move member method `CheckImportedLibName` to impl

parent afc4612f
......@@ -207,6 +207,9 @@ public:
cmListFileBacktrace Backtrace;
public:
bool CheckImportedLibName(std::string const& prop,
std::string const& value) const;
std::string ProcessSourceItemCMP0049(const std::string& s);
};
......@@ -1167,7 +1170,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
this->GetGlobalGenerator()->IndexTarget(this);
}
} else if (cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME") &&
!this->CheckImportedLibName(prop, value ? value : "")) {
!impl->CheckImportedLibName(prop, value ? value : "")) {
/* error was reported by check method */
} else if (prop == propCUDA_PTX_COMPILATION &&
this->GetType() != cmStateEnums::OBJECT_LIBRARY) {
......@@ -1808,12 +1811,12 @@ void cmTarget::SetPropertyDefault(const std::string& property,
}
}
bool cmTarget::CheckImportedLibName(std::string const& prop,
std::string const& value) const
bool cmTargetInternals::CheckImportedLibName(std::string const& prop,
std::string const& value) const
{
if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY ||
!this->IsImported()) {
impl->Makefile->IssueMessage(
if (this->TargetType != cmStateEnums::INTERFACE_LIBRARY ||
!this->IsImportedTarget) {
this->Makefile->IssueMessage(
MessageType::FATAL_ERROR,
prop +
" property may be set only on imported INTERFACE library targets.");
......@@ -1821,14 +1824,14 @@ bool cmTarget::CheckImportedLibName(std::string const& prop,
}
if (!value.empty()) {
if (value[0] == '-') {
impl->Makefile->IssueMessage(MessageType::FATAL_ERROR,
this->Makefile->IssueMessage(MessageType::FATAL_ERROR,
prop + " property value\n " + value +
"\nmay not start with '-'.");
return false;
}
std::string::size_type bad = value.find_first_of(":/\\;");
if (bad != std::string::npos) {
impl->Makefile->IssueMessage(MessageType::FATAL_ERROR,
this->Makefile->IssueMessage(MessageType::FATAL_ERROR,
prop + " property value\n " + value +
"\nmay not contain '" +
value.substr(bad, 1) + "'.");
......
......@@ -266,9 +266,6 @@ private:
void SetPropertyDefault(const std::string& property,
const char* default_value);
bool CheckImportedLibName(std::string const& prop,
std::string const& value) const;
private:
cmTargetInternalPointer impl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment