summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-03-23 17:43:41 +0100
committerSebastian Holtermann <sebholt@xwmw.org>2019-03-23 22:22:34 +0100
commitff91071a14885b9e031b262e5d576b8f174870a2 (patch)
treee5bd0f4c5849ff905701c05001a7159ee527f6f5 /Source
parentafc4612fa57da09748745fefac02a2086f374db1 (diff)
downloadcmake-ff91071a14885b9e031b262e5d576b8f174870a2.tar.gz
cmTarget: Move member method `CheckImportedLibName` to impl
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx19
-rw-r--r--Source/cmTarget.h3
2 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index c4cff52008..a90e1b5fd9 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -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) + "'.");
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index a4696c85dd..c0a0cb555e 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -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;