<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("-fsanitize=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 instead 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>