summaryrefslogtreecommitdiffstats
path: root/Source/cmFindLibraryCommand.cxx
diff options
context:
space:
mode:
authorRafael Sadowski <rafael@sizeofvoid.org>2023-12-17 23:39:31 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-05 20:36:44 (GMT)
commit1fafe35e81518f2d6bbd45fa8a7aa50a3681551c (patch)
treeefeac2c8b0e318242d77b61b9f163f4542411109 /Source/cmFindLibraryCommand.cxx
parent47bfca8494f6ba5bd9eab686f4305097693927d8 (diff)
downloadCMake-1fafe35e81518f2d6bbd45fa8a7aa50a3681551c.zip
CMake-1fafe35e81518f2d6bbd45fa8a7aa50a3681551c.tar.gz
CMake-1fafe35e81518f2d6bbd45fa8a7aa50a3681551c.tar.bz2
Source: Restore compilation on OpenBSD
We cannot use `OpenBSD` as a name, it is defined in `sys/param.h`.
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r--Source/cmFindLibraryCommand.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index df77ad0..9df7665 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -207,7 +207,7 @@ struct cmFindLibraryHelper
std::string BestPath;
// Support for OpenBSD shared library naming: lib<name>.so.<major>.<minor>
- bool OpenBSD;
+ bool IsOpenBSD;
bool DebugMode;
@@ -320,7 +320,7 @@ cmFindLibraryHelper::cmFindLibraryHelper(std::string debugName, cmMakefile* mf,
this->RegexFromList(this->SuffixRegexStr, this->Suffixes);
// Check whether to use OpenBSD-style library version comparisons.
- this->OpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
+ this->IsOpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
"FIND_LIBRARY_USE_OPENBSD_VERSIONING");
}
@@ -390,7 +390,7 @@ void cmFindLibraryHelper::AddName(std::string const& name)
std::string regex = cmStrCat('^', this->PrefixRegexStr);
this->RegexFromLiteral(regex, name);
regex += this->SuffixRegexStr;
- if (this->OpenBSD) {
+ if (this->IsOpenBSD) {
regex += "(\\.[0-9]+\\.[0-9]+)?";
}
regex += "$";
@@ -472,7 +472,7 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path,
size_type suffix = this->GetSuffixIndex(name.Regex.match(2));
unsigned int major = 0;
unsigned int minor = 0;
- if (this->OpenBSD) {
+ if (this->IsOpenBSD) {
sscanf(name.Regex.match(3).c_str(), ".%u.%u", &major, &minor);
}
if (this->BestPath.empty() || prefix < bestPrefix ||