<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>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}.<br>
</p>
<div class="moz-cite-prefix">Am 02.06.19 um 14:16 schrieb Steven
Truppe:<br>
</div>
<blockquote type="cite"
cite="mid:a80b078b-447e-ae5b-f46f-4a7e3cb88956@gmx.at">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hi everyone,</p>
<p><br>
</p>
<p>i'm trying to search for a way for win32 to get the cpu core
count. i found the c code:<br>
</p>
<pre class="default prettyprint prettyprinted" style=""><code><span class="pln">SYSTEM_INFO sysinfo</span><span class="pun">;</span><span class="pln">
</span><span class="typ">GetSystemInfo</span><span class="pun">(&</span><span class="pln">sysinfo</span><span class="pun">);</span><span class="pln">
</span><span class="kwd">int</span><span class="pln"> numCPU </span><span class="pun">=</span><span class="pln"> sysinfo</span><span class="pun">.</span><span class="pln">dwNumberOfProcessors</span><span class="pun">;
Is there a way i can get the return value numCPU and create a variable out of it ? for apple and linux i allready have a
solution only win32 is left.
best regards!
</span></code></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
<div class="moz-signature">-- <br>
<div style="width:480px; text-align: left; font-family: Arial,
Helvetica, sans-serif;">
<p style="color: #062d64; font-size: 14px; text-align: left;
font-family: Arial, Helvetica, sans-serif;"><b>
Dr. Eric Dönges
</b><br>
Senior Software Engineer
</p>
<p style="color: #062d64; font-size: 12px; text-align: left;
font-family: Arial, Helvetica, sans-serif;">MVTec Software
GmbH | Arnulfstr. 205 | 80634 Munich | Germany<br>
<a style="font-size: 12px; font-family: Arial, Helvetica,
sans-serif; color: #062d64;" href="mailto:doenges@mvtec.com">doenges@mvtec.com</a>
| Tel: +49 89 457 695-0 | <a style="font-size: 12px;
font-family: Arial, Helvetica, sans-serif; color: #062d64;"
href="http://www.mvtec.com">www.mvtec.com</a>
</p>
<p style="color: #062d64; font-size: 12px; text-align: left;
font-family: Arial, Helvetica, sans-serif;"><img
src="https://mvtec.com/fileadmin/Redaktion/newsletter/mail-signature/newsletter-icon.png"
valign="bottom" width="16" height="16"> <a style="font-size:
12px; font-family: Arial, Helvetica, sans-serif; color:
#062d64; font-weight: bold;"
href="http://www.mvtec.com/newsletter">Sign up</a> for our
MVTec Newsletter!</p>
<p style="margin: 0px; color: #666; font-size: 12px; text-align:
left; font-family: Arial, Helvetica, sans-serif;">Geschäftsführer:
Dr. Wolfgang Eckstein, Dr. Olaf Munkelt<br>
Amtsgericht München HRB 114695</p>
<p style="margin: 0px; color: #666; font-size: 12px; text-align:
left; font-family: Arial, Helvetica, sans-serif;"> </p>
<img
src="https://www.mvtec.com/fileadmin/Redaktion/newsletter/mail-signature/mvtec-logo-line.png"
alt="MVTec Software GmbH Logo"></div>
</div>
</body>
</html>