mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
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
This commit is contained in:
committed by
Brad King
parent
1edebc3f99
commit
31a1906652
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user