Browse Source

Merge topic 'update-kwsys'

8d29d3c79b Merge branch 'upstream-KWSys' into update-kwsys
31a1906652 KWSys 2024-05-06 (307037cf)

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !9493
Brad King 1 year ago
parent
commit
f082c3d4c3
1 changed files with 7 additions and 2 deletions
  1. 7 2
      Source/kwsys/SystemInformation.cxx

+ 7 - 2
Source/kwsys/SystemInformation.cxx

@@ -4646,7 +4646,7 @@ bool SystemInformationImplementation::ParseSysCtl()
     err = sysctlbyname("hw.machine", &tempBuff, &len, nullptr, 0);
     err = sysctlbyname("hw.machine", &tempBuff, &len, nullptr, 0);
     if (err == 0) {
     if (err == 0) {
       std::string machineBuf(tempBuff);
       std::string machineBuf(tempBuff);
-      if (machineBuf.find_first_of("Power") != std::string::npos) {
+      if (machineBuf.find("Power") != std::string::npos) {
         this->ChipID.Vendor = "IBM";
         this->ChipID.Vendor = "IBM";
 
 
         err = kw_sysctlbyname_int32("hw.cputype", &tempInt32);
         err = kw_sysctlbyname_int32("hw.cputype", &tempInt32);
@@ -4660,10 +4660,15 @@ bool SystemInformationImplementation::ParseSysCtl()
         }
         }
 
 
         this->FindManufacturer();
         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->ChipID.Vendor = "Apple";
 
 
         this->FindManufacturer();
         this->FindManufacturer();
+
+        err = kw_sysctlbyname_int32("hw.optional.floatingpoint", &tempInt32);
+        if (err == 0) {
+          this->Features.HasFPU = static_cast<bool>(tempInt32);
+        }
       }
       }
     }
     }
   } else {
   } else {