The easiest way to get the number of cores on your Windows build machine
from within CMake is to get the value of the NUMBER_OF_PROCESSORS
environment variable using $ENV{NUMBER_OF_PROCESSORS}.
Am 02.06.19 um 14:16 schrieb Steven Truppe:
Hi everyone,
i'm trying to search for a way for
m: Steven Truppe
> To: CMake MailingList
> Cc:
> Bcc:
> Date: Sun, 2 Jun 2019 14:16:53 +0200
> Subject: [CMake] Question about running C code from within cmake
>
> Hi everyone,
>
>
> i'm trying to search for a way for win32 to get the cpu core count. i
> found the c
have a look at https://cmake.org/cmake/help/latest/module/ProcessorCount.html
If you still think you really need to compile/run code for this, have a look at
https://cmake.org/cmake/help/latest/command/try_run.html#command:try_run, but
that is harder to get working and maintain.
> On Jun 2,
Hi everyone,
i'm trying to search for a way for win32 to get the cpu core count. i
found the c code:
|SYSTEM_INFO sysinfo;GetSystemInfo();intnumCPU
=sysinfo.dwNumberOfProcessors; Is there a way i can get the return value
numCPU and create a variable out of it ? for apple and linux i allready