MantisBT - CMake
View Issue Details
0008496CMakeCTestpublic2009-02-10 18:022009-02-12 10:09
augiedoggie 
 
normalminorhave not tried
closedfixed 
 
 
0008496: kwsys tries to read /proc/cpuinfo on Haiku OS
While attempting to submit ctest results to the public dashboard I noticed that it was attempting to read /proc/cpuinfo to gather information. Haiku OS does not have a /proc filesystem, so I wrote the needed method for Source/kwsys/SystemInformation.cpp to gather CPU/Memory information.
No tags attached.
diff cmake_systeminformation_haiku.diff (3,278) 2009-02-10 18:02
https://public.kitware.com/Bug/file/2044/cmake_systeminformation_haiku.diff
diff cmake_systeminformation_haiku2.diff (3,763) 2009-02-11 21:11
https://public.kitware.com/Bug/file/2051/cmake_systeminformation_haiku2.diff
Issue History
2009-02-10 18:02augiedoggieNew Issue
2009-02-10 18:02augiedoggieFile Added: cmake_systeminformation_haiku.diff
2009-02-10 18:42augiedoggieNote Added: 0014887
2009-02-10 19:15augiedoggieNote Edited: 0014887
2009-02-10 19:31Bill HoffmanNote Added: 0014890
2009-02-11 21:11augiedoggieNote Added: 0014907
2009-02-11 21:11augiedoggieFile Added: cmake_systeminformation_haiku2.diff
2009-02-12 10:09Bill HoffmanNote Added: 0014911
2009-02-12 10:09Bill HoffmanStatusnew => closed
2009-02-12 10:09Bill HoffmanResolutionopen => fixed

Notes
(0014887)
augiedoggie   
2009-02-10 18:42   
(edited on: 2009-02-10 19:15)
The attached patch is only partially working. No crashes, but, need to figure out why the vendor name has garbage at the end. Need to reduce the cpu frequency from Hz to MHz. Also, TotalPhysicalMemory isn't being reported properly in the log files. Have to check and see if it's supposed to be in bytes/KB/MB/etc...

(0014890)
Bill Hoffman   
2009-02-10 19:31   
strcpy(this->ChipID.Vendor,cpu_info.eax_0.vendor_id); Is eax_0.vendor_id perhaps not null terminated?
(0014907)
augiedoggie   
2009-02-11 21:11   
Yup, sorry about that. The new patch should fix the problems. CPU speed is now in MHz, memory is calculated properly, and vendor_id is put into a temporary buffer with a NULL character appended.
(0014911)
Bill Hoffman   
2009-02-12 10:09   
$ cvs commit -m "BUG: 0008496 add support for system info on haiku" SystemInformation.cxx
Committer: Bill Hoffman <bill.hoffman@kitware.com>
Commit to directory "CMake/Source/kwsys" lies in external project KWSys
/cvsroot/CMake/CMake/Source/kwsys/SystemInformation.cxx,v <-- SystemInformation.cxx
new revision: 1.38; previous revision: 1.37

Thanks for the patch!