cmake check_c_compiler_flag() examples

CGNS/CGNS src/CMakeLists.txt :73

check_c_compiler_flag("${_option}" ${_option_variable})

civetweb/civetweb CMakeLists.txt :435

Check_C_Compiler_Flag( HAVE_NO_RESERVED_ID_MACROS -Wno-reserved-id-macros)

cpputest/cpputest cmake/warnings.cmake :55

check_c_compiler_flag("${flag}" WARNING_C_FLAG_${flag})

kode54/dumb CMakeLists.txt :45

check_c_compiler_flag("-msse" "CC_HAS_MSSE")

xiph/flac CMakeLists.txt :163

check_c_compiler_flag(-Werror HAVE_WERROR_FLAG)

xiph/flac CMakeLists.txt :164

check_c_compiler_flag(-Wdeclaration-after-statement HAVE_DECL_AFTER_STMT_FLAG)

xiph/flac CMakeLists.txt :184

check_c_compiler_flag("-fstack-protector-strong" HAVE_STACK_PROTECTOR_FLAG)

flintlib/flint CMakeLists.txt :62

check_c_compiler_flag("-march=${ENABLE_ARCH}" HAS_FLAG_ARCH)

flintlib/flint CMakeLists.txt :71

check_c_compiler_flag("${avx2_flag}" HAS_FLAG_AVX2)

flintlib/flint CMakeLists.txt :92

check_c_compiler_flag("${avx512_flag}" HAS_FLAG_AVX512)

flintlib/flint CMakeLists.txt :286

check_c_compiler_flag("-funroll-loops" HAS_FLAG_UNROLL_LOOPS)

fontforge/fontforge cmake/BuildUtils.cmake :130

check_c_compiler_flag("-fsanitize=${type} -fno-omit-frame-pointer" "_sanitizer_${type}")

fontforge/fontforge cmake/TargetUtils.cmake :94

check_c_compiler_flag("-Werror ${_arg}" _supported_flag)

FreeGLUTProject/freeglut CMakeLists.txt :663

CHECK_C_COMPILER_FLAG(-gstabs+ HAVE_GSTABSP_FLAG)

FreeRDP/FreeRDP cmake/CheckAndSetFlag.cmake :15

check_c_compiler_flag("${FLAG}" C_FLAG)

dgasmith/gau2grid cmake/psi4OptionsTools.cmake :99

CHECK_C_COMPILER_FLAG("${flag_i}" test_option)

OSGeo/gdal cmake/helpers/GdalCompilationFlags.cmake :97

check_c_compiler_flag("-Wformat -Werror=format-security -Wno-format-nonliteral" HAVE_WFLAG_FORMAT_SECURITY)

OSGeo/gdal cmake/helpers/GdalCompilationFlags.cmake :155

check_c_compiler_flag(-ftrapv HAVE_FTRAPV)

OSGeo/gdal cmake/helpers/GdalCompilationFlags.cmake :210

check_c_compiler_flag(-wd2312 HAVE_WD2312) # pointer cast involving 64-bit pointed-to type

glfw/glfw src/CMakeLists.txt :333

check_c_compiler_flag("" _GLFW_HAS_64ASLR)

HDFGroup/hdf4 config/cmake/ZLIBNG/CMakeLists.txt :286

check_c_compiler_flag(-Wno-pedantic-ms-format HAVE_NO_PEDANTIC_MS_FORMAT)

HDFGroup/hdf4 config/cmake/ZLIBNG/CMakeLists.txt :300

check_c_compiler_flag(-march=native HAVE_MARCH_NATIVE)

HDFGroup/hdf4 config/cmake/ZLIBNG/CMakeLists.txt :304

check_c_compiler_flag(-mcpu=native HAVE_MCPU_NATIVE)

HDFGroup/hdf5 config/cmake/ZLIBNG/CMakeLists.txt :317

check_c_compiler_flag(-mcpu=native HAVE_MCPU_NATIVE)

HDFGroup/hdf5 config/cmake/ZLIBNG/CMakeLists.txt :474

check_c_compiler_flag(-fno-semantic-interposition HAVE_NO_INTERPOSITION)

InsightSoftwareConsortium/ITK CMake/ITKSetStandardCompilerFlags.cmake :34

check_c_compiler_flag(${flag} C_HAS_WARNING${flag_var})

InsightSoftwareConsortium/ITK CMake/ITK_CheckCCompilerFlag.cmake :2

# CHECK_C_COMPILER_FLAG(<flag> <var>)

InsightSoftwareConsortium/ITK Modules/ThirdParty/Expat/src/expat/ConfigureChecks.cmake :67

check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)

InsightSoftwareConsortium/ITK Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ZLIBNG/CMakeLists.txt :288

check_c_compiler_flag(-mcpu=native HAVE_MCPU_NATIVE)

InsightSoftwareConsortium/ITK Modules/ThirdParty/ZLIB/src/itkzlib-ng/CMakeLists.txt :178

check_c_compiler_flag(-diag-disable=10441 HAVE_DIAG_10441)

InsightSoftwareConsortium/ITK Modules/ThirdParty/ZLIB/src/itkzlib-ng/CMakeLists.txt :257

check_c_compiler_flag(-Wno-pedantic-ms-format HAVE_NO_PEDANTIC_MS_FORMAT)

InsightSoftwareConsortium/ITK Modules/ThirdParty/ZLIB/src/itkzlib-ng/CMakeLists.txt :271

check_c_compiler_flag(-march=native HAVE_MARCH_NATIVE)

InsightSoftwareConsortium/ITK Modules/ThirdParty/ZLIB/src/itkzlib-ng/cmake/detect-coverage.cmake :11

check_c_compiler_flag(-coverage HAVE_COVERAGE)

InsightSoftwareConsortium/ITK Modules/ThirdParty/ZLIB/src/itkzlib-ng/cmake/detect-sanitizer.cmake :8

check_c_compiler_flag(-fno-omit-frame-pointer HAVE_NO_OMIT_FRAME_POINTER)

InsightSoftwareConsortium/ITK Modules/ThirdParty/ZLIB/src/itkzlib-ng/cmake/detect-sanitizer.cmake :90

check_c_compiler_flag(-fsanitize-memory-track-origins HAVE_MEMORY_TRACK_ORIGINS)

DanBloomberg/leptonica CMakeLists.txt :243

check_c_compiler_flag(${flag_} ${flag_var})

ebiggers/libdeflate CMakeLists.txt :70

check_c_compiler_flag(-Wdeclaration-after-statement HAVE_WDECLARATION_AFTER_STATEMENT)

ebiggers/libdeflate CMakeLists.txt :75

check_c_compiler_flag(-Wshadow HAVE_WSHADOW)

ebiggers/libdeflate CMakeLists.txt :76

check_c_compiler_flag(-Wstrict-prototypes HAVE_WSTRICT_PROTOTYPES)

libevent/libevent cmake/AddCompilerFlags.cmake :7

check_c_compiler_flag("${flag}" check_c_compiler_flag_${_flag_esc})

libgit2/libgit2 cmake/AddCFlagIfSupported.cmake :12

check_c_compiler_flag(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED)

libgit2/libgit2 cmake/AddCFlagIfSupported.cmake :25

check_c_compiler_flag(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED)

intel/libipt CMakeLists.txt :166

check_c_compiler_flag(${option} ${guard})

Framstag/libosmscout cmake/features.cmake :45

check_c_compiler_flag(-faltivec HAVE_ALTIVEC)

Framstag/libosmscout cmake/features.cmake :46

check_c_compiler_flag(-mavx HAVE_AVX)

Framstag/libosmscout cmake/features.cmake :51

check_c_compiler_flag(-msse2 HAVE_SSE2)

libuv/libuv CMakeLists.txt :108

check_c_compiler_flag(/wd4100 UV_LINT_NO_UNUSED_PARAMETER_MSVC)

libuv/libuv CMakeLists.txt :110

check_c_compiler_flag(/wd4201 UV_LINT_NO_NONSTANDARD_MSVC)

libuv/libuv CMakeLists.txt :111

check_c_compiler_flag(/wd4206 UV_LINT_NO_NONSTANDARD_EMPTY_TU_MSVC)

libuv/libuv CMakeLists.txt :112

check_c_compiler_flag(/wd4210 UV_LINT_NO_NONSTANDARD_FILE_SCOPE_MSVC)

libuv/libuv CMakeLists.txt :113

check_c_compiler_flag(/wd4232 UV_LINT_NO_NONSTANDARD_NONSTATIC_DLIMPORT_MSVC)

libuv/libuv CMakeLists.txt :116

check_c_compiler_flag(/wd4459 UV_LINT_NO_HIDES_GLOBAL)

libuv/libuv CMakeLists.txt :117

check_c_compiler_flag(/wd4706 UV_LINT_NO_CONDITIONAL_ASSIGNMENT_MSVC)

ARMmbed/mbedtls CMakeLists.txt :238

CHECK_C_COMPILER_FLAG("-Wformat-signedness" C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS)

nghttp2/nghttp2 cmake/PickyWarningsC.cmake :155

check_c_compiler_flag(${_CCOPT_ON} ${_optvarname})

ngtcp2/ngtcp2 CMakeLists.txt :111

check_c_compiler_flag(-fsanitize=address C__fsanitize_address_VALID)

nanomsg/nng CMakeLists.txt :204

check_c_compiler_flag(-fvisibility=hidden NNG_HIDDEN_VISIBILITY)

open62541/open62541 CMakeLists.txt :561

check_c_compiler_flag("${CC_FLAG}" flag_supported)

opencv/opencv 3rdparty/libpng/CMakeLists.txt :163

CHECK_C_COMPILER_FLAG("-mlsx" COMPILER_SUPPORTS_LSX)

opencv/opencv 3rdparty/zlib-ng/CMakeLists.txt :262

check_c_compiler_flag(-Wno-pedantic-ms-format HAVE_NO_PEDANTIC_MS_FORMAT)

opencv/opencv 3rdparty/zlib-ng/CMakeLists.txt :280

check_c_compiler_flag(-mcpu=native HAVE_MCPU_NATIVE)

opencv/opencv 3rdparty/zlib-ng/cmake/detect-coverage.cmake :26

check_c_compiler_flag("-ftest-coverage -fprofile-arcs -fprofile-values" HAVE_TEST_COVERAGE)

opencv/opencv 3rdparty/zlib-ng/cmake/detect-intrinsics.cmake :7

check_c_compiler_flag("-march=armv8-a+crc" HAVE_MARCH_ARMV8_CRC)

opencv/opencv 3rdparty/zlib-ng/cmake/detect-intrinsics.cmake :88

check_c_compiler_flag("-mtune=cascadelake" HAVE_CASCADE_LAKE)

opencv/opencv 3rdparty/zlib-ng/cmake/detect-sanitizer.cmake :8

check_c_compiler_flag(-fno-omit-frame-pointer HAVE_NO_OMIT_FRAME_POINTER)

opencv/opencv 3rdparty/zlib-ng/cmake/detect-sanitizer.cmake :90

check_c_compiler_flag(-fsanitize-memory-track-origins HAVE_MEMORY_TRACK_ORIGINS)

mtrojnar/osslsigncode cmake/SetCompilerFlags.cmake :92

check_c_compiler_flag("-fstack-protector" HAVE_STACK_PROTECTOR)

ICLDisco/parsec CMakeLists.txt :348

check_c_compiler_flag("-fsanitize=leak" PARSEC_HAVE_DEBUG_MEM_LEAK)

ICLDisco/parsec CMakeLists.txt :360

check_c_compiler_flag("-fsanitize=address" PARSEC_HAVE_DEBUG_MEM_ADDR)

ICLDisco/parsec cmake_modules/ParsecCompilerFlags.cmake :210

check_c_compiler_flag("${_flag}" PARSEC_FLEX_FLAG${SAFE_flag})

qtwebkit/qtwebkit Source/cmake/WebKitCompilerFlags.cmake :17

check_c_compiler_flag("${_flag}" C_COMPILER_SUPPORTS_${_flag})

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/CMakeLists.txt :178

check_c_compiler_flag(-Wpointer-arith has_wpointer_aritih)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/CMakeLists.txt :190

check_c_compiler_flag(-Winit-self has_winit_self)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/CMakeLists.txt :196

check_c_compiler_flag(-Wno-unused-function has_wno_unused_function)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/CMakeLists.txt :208

check_c_compiler_flag(-Wno-unreachable-code has_wno_unreachable_code)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/yasm/ConfigureChecks.cmake :43

CHECK_C_COMPILER_FLAG(-pipe C_ACCEPTS_PIPE)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/yasm/ConfigureChecks.cmake :44

CHECK_C_COMPILER_FLAG(-ansi C_ACCEPTS_ANSI)

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/yasm/ConfigureChecks.cmake :46

CHECK_C_COMPILER_FLAG(-Wall C_ACCEPTS_WALL)

facebook/rocksdb CMakeLists.txt :232

CHECK_C_COMPILER_FLAG("-mcpu=power9" HAS_POWER9)

facebook/rocksdb CMakeLists.txt :243

CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)

facebook/rocksdb CMakeLists.txt :252

CHECK_C_COMPILER_FLAG("-march=armv8-a+crc+crypto" HAS_ARMV8_CRC)

facebook/rocksdb CMakeLists.txt :268

CHECK_C_COMPILER_FLAG("-march=loongarch64" HAS_LOONGARCH64)

MesserLab/SLiM CMakeLists.txt :231

CHECK_C_COMPILER_FLAG(-flto C_SUPPORTS_FLTO)

ThePhD/sol2 cmake/Modules/CheckCompilerDiagnostic.cmake :64

check_c_compiler_flag(-wo${diagnostic_MSVC} C_DIAGNOSTIC_${suffix})

ThePhD/sol2 cmake/Modules/CheckCompilerDiagnostic.cmake :68

check_c_compiler_flag(-W${diagnostic_GCC} C_DIAGNOSTIC_${suffix})

ThePhD/sol2 cmake/Modules/CheckCompilerFlag.cmake :62

check_c_compiler_flag(${flag_MSVC} C_CHECK_FLAG_${suffix})

ThePhD/sol2 cmake/Modules/CheckCompilerFlag.cmake :64

check_c_compiler_flag(${flag_CLANG} C_CHECK_FLAG_${suffix})

ThePhD/sol2 cmake/Modules/CheckCompilerFlag.cmake :66

check_c_compiler_flag(${flag_GCC} C_CHECK_FLAG_${suffix})

DrTimothyAldenDavis/SuiteSparse UMFPACK/CMakeLists.txt :306

check_c_compiler_flag ( "-Wno-pass-failed" HAVE_NO_PASS_FAILED )

transmission/transmission CMakeLists.txt :722

check_c_compiler_flag(${FLAG} ${CACHE_ID})

transmission/transmission tests/gtest/CMakeLists.txt :8

check_c_compiler_flag(-Wnull-dereference ${CACHE_ID})

movableink/webkit Source/cmake/WebKitCompilerFlags.cmake :69

check_c_compiler_flag("${_flag}" C_COMPILER_SUPPORTS_${_flag})

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/CMakeLists.txt :172

check_c_compiler_flag(-Wshadow has_wshadow)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/CMakeLists.txt :196

check_c_compiler_flag(-Wno-unused-function has_wno_unused_function)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/yasm/ConfigureChecks.cmake :43

CHECK_C_COMPILER_FLAG(-pipe C_ACCEPTS_PIPE)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/yasm/ConfigureChecks.cmake :44

CHECK_C_COMPILER_FLAG(-ansi C_ACCEPTS_ANSI)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/yasm/ConfigureChecks.cmake :46

CHECK_C_COMPILER_FLAG(-Wall C_ACCEPTS_WALL)

zint/zint CMakeLists.txt :110

check_c_compiler_flag(-fsanitize=${sanitizer} C_COMPILER_FLAG_FSANITIZE_${sanitizer})

zint/zint backend/CMakeLists.txt :102

check_c_compiler_flag("-Wc90-c99-compat" C_COMPILER_FLAG_WC90_C99_COMPAT)

gdraheim/zziplib CMakeScripts/CodeCoverage.cmake :179

check_c_compiler_flag(-fprofile-abs-path HAVE_c_fprofile_abs_path)