cmake check_c_compiler_flag examples

Signatures

check_c_compiler_flag(<flag> <resultVar>)

Examples

AtomicGameEngine/AtomicGameEngine Source/ThirdParty/libcurl/LibCurl.cmake :1261

check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)

u3d-community/U3D Source/ThirdParty/SDL/CMakeLists.txt :574

check_c_compiler_flag(-Wall HAVE_GCC_WALL)

urho3d/urho3d Source/ThirdParty/SDL/CMakeLists.txt :402

check_c_compiler_flag(-Wall HAVE_GCC_WALL)

alicevision/AliceVision src/cmake/AddCompilerFlag.cmake :6

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

godlikepanos/anki-3d-engine ThirdParty/Reproc/cmake/reproc.cmake :134

check_c_compiler_flag(/permissive- REPROC_HAVE_PERMISSIVE)

prusa3d/Prusa-Firmware lib/Catch2/CMake/Findcodecov.cmake :92

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

bambulab/BambuStudio deps/EXPAT/expat/ConfigureChecks.cmake :66

check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)

tinyobjloader/tinyobjloader cmake/sanitizers/sanitize-helpers.cmake :80

check_c_compiler_flag("${FLAG}" ${VARIABLE})

SoftFever/OrcaSlicer deps/EXPAT/expat/ConfigureChecks.cmake :66

check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)

kcat/openal-soft CMakeLists.txt :366

check_c_compiler_flag(-ftrivial-auto-var-init=pattern HAVE_FTRIVIAL_AUTO_VAR_INIT)

cadaver/turso3d ThirdParty/SDL/CMakeLists.txt :558

check_c_compiler_flag(-Wno-error=deprecated-declarations COMPILER_SUPPORTS_WNO_ERROR_DEPRECATED_DECLARATIONS)

Hork-Engine/Hork-Source ThirdParty/SDL3/CMakeLists.txt :560

check_c_compiler_flag(-Wno-error=deprecated-declarations COMPILER_SUPPORTS_WNO_ERROR_DEPRECATED_DECLARATIONS)

STORM-IRIT/Radium-Engine cmake/CodeCoverage.cmake :181

check_c_compiler_flag(-fprofile-abs-path HAVE_c_fprofile_abs_path)

RavEngine/RavEngine deps/GameNetworkingSockets/GameNetworkingSockets/cmake/sanitize-helpers.cmake :80

check_c_compiler_flag("${FLAG}" ${VARIABLE})

keith2018/SoftGLRender third_party/assimp/contrib/draco/cmake/compiler_flags.cmake :26

check_c_compiler_flag("${c_flag}" C_FLAG_SUPPORTED)

alpaka-group/alpaka thirdParty/catch2/CMake/Findcodecov.cmake :92

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

nextcloud/desktop cmake/modules/DefineCompilerFlags.cmake :38

check_c_compiler_flag("-fPIC" WITH_FPIC)

ANTsX/ANTs CMake/ITKSetStandardCompilerFlags.cmake :34

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

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

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

Morwenn/cpp-sort cmake/Findcodecov.cmake :97

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

pnnl/SHAD cmake/config.cmake :27

check_c_compiler_flag("-march=native" C_SUPPORT_MARCH_NATIVE)

liminchen/OptCuts ext/libigl/external/glfw/CMakeLists.txt :124

check_c_compiler_flag("" _GLFW_HAS_DEP)

wpilibsuite/allwpilib thirdparty/imgui_suite/glfw/src/CMakeLists.txt :350

check_c_compiler_flag("" _GLFW_HAS_DEP)

bareos/bareos cmake/BareosDisableWarnings.cmake :55

check_c_compiler_flag(
        "-W${plain_warning}" "CC_SUPPORTS_W${plain_warning_sym}"
      )

maidsafe-archive/MaidSafe cmake_modules/find_asan.cmake :32

check_c_compiler_flag("-fsanitize=address" HAVE_FLAG_SANITIZE_ADDRESS)

CroatiaControlLtd/asterix src/asterix/wireshark-plugin/1.10.6/CMakeLists.txt :198

check_c_compiler_flag(${${F}} ${V})

RichieSams/FiberTaskingLib third_party/catch2/CMake/Findcodecov.cmake :92

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

facebook/rocksdb CMakeLists.txt :232

CHECK_C_COMPILER_FLAG("-mcpu=power9" HAS_POWER9)

JSBSim-Team/jsbsim tests/unit_tests/CMakeModules/Findcodecov.cmake :97

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

gnss-sdr/gnss-sdr src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt :169

check_c_compiler_flag(-fcx-limited-range HAVE_C_LIMITED_RANGE)

ByConity/ByConity cmake/add_warning.cmake :10

check_c_compiler_flag("-W${flag}" SUPPORTS_CFLAG_${underscored_flag})

psi4/psi4 cmake/psi4OptionsTools.cmake :120

CHECK_C_COMPILER_FLAG("${flag_i}" test_option)

chdb-io/chdb cmake/add_warning.cmake :10

check_c_compiler_flag("-W${flag}" SUPPORTS_CFLAG_${underscored_flag})

LiangliangNan/MVStudio 3rd_party/nlopt/CMakeLists.txt :275

check_c_compiler_flag (-fPIC HAS_FPIC)

Amber-MD/cpptraj cmake-cpptraj/CompilerFlags.cmake :87

check_c_compiler_flag(-fplugin=${DRAGONEGG} DRAGONEGG_C_WORKS)

DIPlib/diplib dependencies/libtiff/CMakeLists.txt :137

CHECK_C_COMPILER_FLAG(${flag} "${test_c_flag}")

Tulip-Dev/tulip thirdparty/yajl/CMakeLists.txt :41

CHECK_C_COMPILER_FLAG(-fvisibility=hidden HAVE_GCC_VISIBILITY)

gismo/gismo cmake/AddCompilerFlag.cmake :140

check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc} "${_c_code}")

trailofbits/polytracker polytracker/src/compiler-rt/cmake/config-ix.cmake :28

check_c_compiler_flag(-nodefaultlibs COMPILER_RT_HAS_NODEFAULTLIBS_FLAG)

ddiakopoulos/polymer third_party/glfw/CMakeLists.txt :118

check_c_compiler_flag("" _GLFW_HAS_DEP)

SimVascular/SimVascular Code/CMake/SimVascularFunctionCheckCompilerFlags.cmake :135

CHECK_C_COMPILER_FLAG(${FLAG_TO_TEST_FIXED} HAS_C_FLAG_${suffix})

NERSC/timemory cmake/Modules/Compilers.cmake :173

check_c_compiler_flag("-Werror" c_werror)

emsec/hal cmake/hal_cmake_tools.cmake :174

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

GoSSIP-SJTU/TripleDoggy cmake/config-ix.cmake :175

check_c_compiler_flag("-Werror=unguarded-availability-new" "C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW")

ceph/ceph cmake/modules/BuildDPDK.cmake :87

check_c_compiler_flag("-Wno-unused-but-set-variable"
    HAVE_UNUSED_BUT_SET_VARIABLE)

catchorg/Catch2 CMake/Findcodecov.cmake :92

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

nghttp2/nghttp2 cmake/ExtractValidFlags.cmake :12

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

gnuradio/gnuradio gr-dtv/lib/CMakeLists.txt :87

check_c_compiler_flag("/arch:SSE2" SSE2_SUPPORTED)

xtensor-stack/xtensor test/set_compiler_flag.cmake :44

check_c_compiler_flag("${flag}" _${flag}_works)

apache/trafficserver lib/Catch2/CMake/Findcodecov.cmake :92

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

simbody/simbody cmake/Findcodecov.cmake :60

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

hlrs-vis/covise cmake/cef_variables.cmake :155

CHECK_C_COMPILER_FLAG(-Wno-unused-local-typedefs COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS)

vengi-voxel/vengi cmake/system/linux.cmake :53

check_c_compiler_flag(${_FLAG} HAVE_FLAG${_NAME})

YosysHQ/nextpnr 3rdparty/sanitizers-cmake/cmake/sanitize-helpers.cmake :73

check_c_compiler_flag("${FLAG}" ${VARIABLE})

steemit/steem libraries/vendor/rocksdb/CMakeLists.txt :194

CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)

brndnmtthws/conky 3rdparty/Vc/cmake/AddCompilerFlag.cmake :108

check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc} "${_c_code}")

root-project/root builtins/zstd/cmake/AddZstdCompilationFlags.cmake :10

CHECK_C_COMPILER_FLAG(${_flag} C_FLAG_${varname})

projectM-visualizer/projectm cmake/GenerateExportHeader.cmake :242

check_c_compiler_flag(-fvisibility=hidden COMPILER_HAS_HIDDEN_VISIBILITY)

google/filament third_party/civetweb/CMakeLists.txt :415

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

percona/percona-xtrabackup extra/curl/curl-8.9.1/CMakeLists.txt :1531

check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)

NREL/EnergyPlus third_party/btwxt/cmake/Findcodecov.cmake :92

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

Devsh-Graphics-Programming/Nabla cmake/adjust/flags.cmake :158

check_c_compiler_flag("${CLI_COMPILE_OPTIONS}" "${FLAG_VAR}")

mysql/mysql-server extra/curl/curl-8.14.1/CMake/PickyWarnings.cmake :282

check_c_compiler_flag(${_ccopt_on} ${_optvarname})

Gargaj/Bonzomatic external/glfw/CMakeLists.txt :113

check_c_compiler_flag("" _GLFW_HAS_DEP)

mysql/mysql-router cmake/libutils.cmake :320

CHECK_C_COMPILER_FLAG("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN)

keepassxreboot/keepassxc CMakeLists.txt :265

check_c_compiler_flag("${FLAG}" CC_HAS${FLAGNAME})

keepassx/keepassx CMakeLists.txt :81

check_c_compiler_flag("-Werror=format-security -Werror=implicit-function-declaration" WERROR_C_AVAILABLE)

TheAssassin/AppImageLauncher cmake/reproducible_builds.cmake :22

check_c_compiler_flag(${flags} ${type}_prefix_map_flag_available)

infiniflow/infinity third_party/curl/CMakeLists.txt :1694

check_c_compiler_flag("-Wno-long-double" HAVE_C_FLAG_Wno_long_double)

d1vanov/quentier cmake/modules/sanitizers/sanitize-helpers.cmake :73

check_c_compiler_flag("${FLAG}" ${VARIABLE})

fligger/FateInjector wxWidgets-3.2.0/src/expat/expat/ConfigureChecks.cmake :66

check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)

faheel/BigInt CMake/Findcodecov.cmake :92

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

AshamaneProject/AshamaneCore dep/cpr/opt/curl/CMakeLists.txt :98

CHECK_C_COMPILER_FLAG(${_CCOPT} OPT${_CCOPT})

FilmKilns/FilmKilns src/skia/third_party/externals/expat/expat/ConfigureChecks.cmake :65

check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)

asset-group/5ghoul-5g-nr-attacks libs/glfw/src/CMakeLists.txt :211

check_c_compiler_flag("" _GLFW_HAS_DEP)

alibaba/AliSQL configure.cmake :435

CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG)

KhronosGroup/SPIRV-LLVM cmake/modules/HandleLLVMOptions.cmake :122

check_c_compiler_flag("-Werror ${flag}" "C_SUPPORTS_${name}")

KiCad/kicad-source-mirror thirdparty/sentry-native/external/crashpad/libunwind/cmake/config-ix.cmake :28

check_c_compiler_flag(-nostdlib++ LIBUNWIND_SUPPORTS_NOSTDLIBXX_FLAG)

OpenSpace/OpenSpace modules/webbrowser/cmake/patch/cmake/cef_variables.cmake :147

CHECK_C_COMPILER_FLAG(-Wno-unused-local-typedefs COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS)

spotify/pedalboard vendors/fftw3/CMakeLists.txt :138

check_c_compiler_flag (${FLAG} HAVE_SSE)

Project-OSRM/osrm-backend cmake/warnings.cmake :10

check_c_compiler_flag("-W${flag}" SUPPORTS_CFLAG_${underscored_flag})

microsoft/DirectXShaderCompiler cmake/modules/HandleLLVMOptions.cmake :170

check_c_compiler_flag("-Werror ${flag}" "C_SUPPORTS_${name}")

flux-framework/flux-sched cmake/sanitizers-cmake/cmake/sanitize-helpers.cmake :81

check_c_compiler_flag("${FLAG}" ${VARIABLE})

qtfreet00/llvm-obfuscator cmake/modules/HandleLLVMOptions.cmake :170

check_c_compiler_flag("-Werror ${flag}" "C_SUPPORTS_${name}")

mmp/pbrt-v4 cmake/sanitize-helpers.cmake :73

check_c_compiler_flag("${FLAG}" ${VARIABLE})

mmp/pbrt-v3 cmake/sanitize-helpers.cmake :73

check_c_compiler_flag("${FLAG}" ${VARIABLE})

yrnkrn/zapcc cmake/config-ix.cmake :200

check_c_compiler_flag("-Werror=unguarded-availability-new" "C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW")

BobLChen/PathTracer external/glfw/CMakeLists.txt :113

check_c_compiler_flag("" _GLFW_HAS_DEP)

SpanDB/SpanDB CMakeLists.txt :207

CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)

oscarlab/betrfs cmake_modules/TokuSetupCompiler.cmake :46

check_c_compiler_flag("${flag}" HAVE_C_${flagname})

NauEngine/NauEnginePublic engine/3rdparty_libs/GameNetworkingSockets/cmake/sanitize-helpers.cmake :80

check_c_compiler_flag("${FLAG}" ${VARIABLE})

bytedance/terarkdb CMakeLists.txt :272

CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)

nwnxee/unified CMakeModules/sanitize-helpers.cmake :73

check_c_compiler_flag("${FLAG}" ${VARIABLE})

keystone-engine/keystone llvm/cmake/modules/HandleLLVMOptions.cmake :165

check_c_compiler_flag("-Werror ${flag}" "C_SUPPORTS_${name}")

rbfx/rbfx Source/ThirdParty/capstone/CMakeLists.txt :32

check_c_compiler_flag("-Wno-maybe-uninitialized" SUPPORTS_MU)

InsightSoftwareConsortium/ITK CMake/ITKSetStandardCompilerFlags.cmake :30

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

ComputationalBiomechanicsLab/opensim-creator third_party/libosim/simbody/cmake/Findcodecov.cmake :60

check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)

WohlSoft/Moondust-Project _common/build_props.cmake :49

check_c_compiler_flag("${WARNINGFLAG}" HAVE_W_C_${WARNING_VAR})

PacktPublishing/The-Modern-Vulkan-Cookbook source/chapter8/app/src/main/cpp/thirdparty/OpenXR-SDK/src/CMakeLists.txt :446

check_c_compiler_flag(${FLAG} SUPPORTS_C_${_flagvar})

logicalclocks/rondb extra/curl/curl-8.11.1/CMakeLists.txt :1774

check_c_compiler_flag("-Wno-long-double" HAVE_C_FLAG_Wno_long_double)