diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-23 16:43:41 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-23 21:22:34 (GMT) |
commit | ff91071a14885b9e031b262e5d576b8f174870a2 (patch) | |
tree | e5bd0f4c5849ff905701c05001a7159ee527f6f5 /Source/cmTarget.cxx | |
parent | afc4612fa57da09748745fefac02a2086f374db1 (diff) | |
download | CMake-ff91071a14885b9e031b262e5d576b8f174870a2.zip CMake-ff91071a14885b9e031b262e5d576b8f174870a2.tar.gz CMake-ff91071a14885b9e031b262e5d576b8f174870a2.tar.bz2 |
cmTarget: Move member method `CheckImportedLibName` to impl
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c4cff52..a90e1b5 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) + "'."); |