mirror of
https://github.com/opencv/opencv.git
synced 2024-12-16 02:19:12 +08:00
293063eed3
Rair hangs on library installation fixed.
32 lines
534 B
C++
32 lines
534 B
C++
#include "ProcReader.h"
|
|
#include "StringUtils.h"
|
|
#include <fstream>
|
|
|
|
using namespace std;
|
|
|
|
map<string, string> GetCpuInfo()
|
|
{
|
|
map<string, string> result;
|
|
ifstream f;
|
|
|
|
f.open("/proc/cpuinfo");
|
|
if (f.is_open())
|
|
{
|
|
while (!f.eof())
|
|
{
|
|
string tmp;
|
|
string key;
|
|
string value;
|
|
getline(f, tmp);
|
|
if (ParseString(tmp, key, value))
|
|
{
|
|
result[key] = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
f.close();
|
|
|
|
return result;
|
|
}
|