CheckCXXCompilerFlag

CheckCXXCompilerFlag

Check whether the CXX compiler supports a given flag.

CHECK_CXX_COMPILER_FLAG(<flag> <var>)

<flag> - the compiler flag
<var>  - variable to store the result

This internally calls the check_cxx_source_compiles macro and sets CMAKE_REQUIRED_DEFINITIONS to <flag>. See help for CheckCXXSourceCompiles for a listing of variables that can otherwise modify the build. The result only tells that the compiler does not give an error message when it encounters the flag. If the flag has any effect or even a specific one is beyond the scope of this module.

© 2000–2016 Kitware, Inc.
© 2000–2011 Insight Software Consortium
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.5/module/CheckCXXCompilerFlag.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部