<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I think it is worth adding to what Mateusz wrote that the
MSVC_RUNTIME_LIBRARY property / CMAKE_MSVC_RUNTIME_LIBRARY
variable are only available if policy CMP0091 is set to NEW, which
it will not be because LLVM's CMakeLists.txt only requires CMake
3.4.3 or later (and thus all policies introduced after 3.4.3 are
set to OLD for compatibility). So if you do not want to edit
LLVM's CMakeLists.txt, you need to use the options provided by
LLVM's CMake project to control the build.</p>
<p>We select the CRT LLVM's libraries will use with the
LLVM_USE_CRT_DEBUG and LLVM_USE_CRT_RELEASE options, i.e. to build
with a static MSVC runtime we use</p>
<p>-DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT</p>
These options are not documented on the "Building LLVM with CMake"
page, but can be found by looking into LLVM's cmake directory.<br>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Am 28.10.19 um 12:53 schrieb Mateusz
Loskot:<br>
</div>
<blockquote type="cite"
cite="mid:CABUeae9a5NCPb_db5dMu0v=jR+c_5+wSO-Se2VqWUFquwkhUeA@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">On Mon, 28 Oct 2019 at 12:22, Osman Zakir <a class="moz-txt-link-rfc2396E" href="mailto:osmanzakir90@hotmail.com"><osmanzakir90@hotmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
And I should do "-DCMAKE_MSVC_RUNTIME_LIBRARY=/MT"
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Man, read the docs I pasted!!!
<a class="moz-txt-link-freetext" href="https://cmake.org/cmake/help/v3.15/prop_tgt/MSVC_RUNTIME_LIBRARY.html">https://cmake.org/cmake/help/v3.15/prop_tgt/MSVC_RUNTIME_LIBRARY.html</a>
Best regards,
</pre>
</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:mustermann@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>
<br>
</p>
<p>
<span style="font-size: 12px; font-family: Arial, Helvetica,
sans-serif; color: #062d64;">Find our privacy policy <a
style="font-size: 12px; font-family: Arial, Helvetica,
sans-serif; color: #062d64;"
href="https://www.mvtec.com/imprint">here</a>.</span> </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="https://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>