<div dir="ltr"><div>Thank you for pointing that. It increments the number of people using CMAKE_REQUIRED_FLAGS "trick" to make it working with check_cxx_compiler_flag.</div><div><br></div><div>But my question is more about :</div><div> - why they coded <span style="font-size:12.8px">CHECK_CXX_COMPILER_FLAG this way?</span></div><div><span style="font-size:12.8px"> - is my usage valid or not? If not what should I do? If yes, is it a bug?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Regards,</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Damien R.</span></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 December 2017 at 10:35, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Not really answering the question but </div>did you try to use an existing CMake module for handling sanitizers config?<div><br></div><div>I find this one <a href="https://github.com/arsenm/sanitizers-cmake" target="_blank">https://github.com/arsenm/<wbr>sanitizers-cmake</a> very effective, with</div><div>modern CMake target oriented features.</div><div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2017-12-07 9:24 GMT+01:00 Damien R <span dir="ltr"><<a href="mailto:damienrg+list@gmail.com" target="_blank">damienrg+list@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>I am trying to use CHECK_CXX_COMPILER_FLAG with cmake 3.9 to check if the compiler supports asan.</div><div>The CMakeLists.txt is:</div><div><div>cmake_minimum_required(VERSION 3.9)</div><div>include(CheckCXXCompilerFlag)</div><div>check_cxx_compiler_flag("-fsan<wbr>itize=address" COMPILER_SUPPORT_FLAG)</div></div><div><br></div><div>I always got:</div><div>-- Performing Test COMPILER_SUPPORT_FLAG - Failed<br></div><div><br></div><div>Even if the documentation say that CHECK_CXX_COMPILER_FLAG sets CMAKE_REQUIRED_DEFINITIONS by the name of the macro I thought that it would work.</div><div>Can you tell me why CHECK_CXX_COMPILER_FLAG use CMAKE_REQUIRED_DEFINITIONS ins<wbr>tead of CMAKE_REQUIRED_FLAGS</div><div>and what is the official way for checking this flag?</div><div><br></div><div>Regards,</div><div><br></div><div>Damien R.</div><div><br></div></div>
<br></div></div><span class="">--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_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" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/cmake</a><br></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-6825609029323555215gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</font></span></div>
</blockquote></div><br></div>