diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2020-03-20 17:05:24 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2020-03-23 21:41:43 (GMT) |
commit | 48adc297211181a97fab75ef0260fda5147c1195 (patch) | |
tree | 17f278522ccaff4b03bc1eb81cb5177fd42d0f37 /Source/cmGeneratorTarget.cxx | |
parent | bfb69f9543bfa7f9f3c9488bf7e740f21896cec4 (diff) | |
download | CMake-48adc297211181a97fab75ef0260fda5147c1195.zip CMake-48adc297211181a97fab75ef0260fda5147c1195.tar.gz CMake-48adc297211181a97fab75ef0260fda5147c1195.tar.bz2 |
replace "std::string::find(x) == 0" with cmHasPrefix()
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 0c1afa8..af95089 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2023,7 +2023,7 @@ bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir( if (cmGeneratorTarget::ImportInfo const* info = this->GetImportInfo(config)) { if (!info->NoSOName && !info->SOName.empty()) { - if (info->SOName.find("@rpath/") == 0) { + if (cmHasLiteralPrefix(info->SOName, "@rpath/")) { install_name_is_rpath = true; } } else { @@ -2140,7 +2140,7 @@ std::string cmGeneratorTarget::GetSOName(const std::string& config) const return cmSystemTools::GetFilenameName(info->Location); } // Use the soname given if any. - if (info->SOName.find("@rpath/") == 0) { + if (cmHasLiteralPrefix(info->SOName, "@rpath/")) { return info->SOName.substr(6); } return info->SOName; |