<div dir="ltr"><span style="font-size:13px">Very useful page for these types of questions:</span><div style="font-size:13px"><br></div><div style="font-size:13px"><a href="http://www.cmake.org/Wiki/CMake_Useful_Variables" target="_blank">http://www.cmake.org/Wiki/CMake_Useful_Variables</a><br></div><div style="font-size:13px"><br></div><div style="font-size:13px">"if (MINGW)" should work.</div><div style="font-size:13px"><br></div><div style="font-size:13px">Or if you want to go off the compiler id use: <span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.7272720336914px;font-weight:bold;line-height:19.0499992370605px">CMAKE_CXX_COMPILER_ID.</span></div><div style="font-size:13px"><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.7272720336914px;font-weight:bold;line-height:19.0499992370605px"><br></span></div><div style="font-size:13px"><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.7272720336914px;line-height:19.0499992370605px">-Caleb</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 15, 2014 at 11:16 AM, Petr Bena <span dir="ltr"><<a href="mailto:benapetr@gmail.com" target="_blank">benapetr@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Is it possible to set a compiler flags only if compiler is MinGW (that<br>
means these flags wouldn't be set on MSVC).<br>
<br>
if (WIN32) matches both compilers obviously. Thanks<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>J. Caleb Wherry</div><i>Scientific Software Engineer</i><div><br><a href="http://www.calebwherry.com" target="_blank"></a><div><a href="http://www.calebwherry.com" target="_blank">http://www.calebwherry.com</a><br><span><span title="Call with Google Voice"><span title="Call with Google Voice">+1 (615) 708-5651</span></span></span><div><a href="mailto:calebwherry@gmail.com" target="_blank">calebwherry@gmail.com</a></div></div></div></div>
</div>