diff options
author | KWSys Upstream <kwrobot@kitware.com> | 2024-05-06 12:57:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-05-06 13:27:51 (GMT) |
commit | 31a19066520dde51c271a6a0b4c43932ae1a7857 (patch) | |
tree | 48532b4091fc2f8c490fce836da1b10ed14d59ac | |
parent | 1edebc3f99e449e949168e4294fa71a4900bf5b3 (diff) | |
download | CMake-31a19066520dde51c271a6a0b4c43932ae1a7857.zip CMake-31a19066520dde51c271a6a0b4c43932ae1a7857.tar.gz CMake-31a19066520dde51c271a6a0b4c43932ae1a7857.tar.bz2 |
KWSys 2024-05-06 (307037cf)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 307037cfdf7b24cf3b5b845cd8584caed8bfef69 (master).
Upstream Shortlog
-----------------
Juan Ramos (2):
ff14b4f5 SystemInformation: Fix find logic
a347a66b SystemInformation: Implement HasFPU on Apple processors
-rw-r--r-- | SystemInformation.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/SystemInformation.cxx b/SystemInformation.cxx index 5e07e80..428d649 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -4646,7 +4646,7 @@ bool SystemInformationImplementation::ParseSysCtl() err = sysctlbyname("hw.machine", &tempBuff, &len, nullptr, 0); if (err == 0) { std::string machineBuf(tempBuff); - if (machineBuf.find_first_of("Power") != std::string::npos) { + if (machineBuf.find("Power") != std::string::npos) { this->ChipID.Vendor = "IBM"; err = kw_sysctlbyname_int32("hw.cputype", &tempInt32); @@ -4660,10 +4660,15 @@ bool SystemInformationImplementation::ParseSysCtl() } this->FindManufacturer(); - } else if (machineBuf.find_first_of("arm64") != std::string::npos) { + } else if (machineBuf.find("arm64") != std::string::npos) { this->ChipID.Vendor = "Apple"; this->FindManufacturer(); + + err = kw_sysctlbyname_int32("hw.optional.floatingpoint", &tempInt32); + if (err == 0) { + this->Features.HasFPU = static_cast<bool>(tempInt32); + } } } } else { |