mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
Refactor: Run CPU/OS/Memory tests once on first run
This commit is contained in:
@@ -45,10 +45,14 @@ bool cmCMakeHostSystemInformationCommand(std::vector<std::string> const& args,
|
||||
return false;
|
||||
}
|
||||
|
||||
cmsys::SystemInformation info;
|
||||
info.RunCPUCheck();
|
||||
info.RunOSCheck();
|
||||
info.RunMemoryCheck();
|
||||
static cmsys::SystemInformation info;
|
||||
static auto initialized = false;
|
||||
if (!initialized) {
|
||||
info.RunCPUCheck();
|
||||
info.RunOSCheck();
|
||||
info.RunMemoryCheck();
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
std::string result_list;
|
||||
for (size_t i = current_index + 1; i < args.size(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user