apache/arrow
cpp/cmake_modules/SetupCxxFlags.cmake
:72
check_cxx_compiler_flag(${ARROW_AVX2_FLAG} CXX_SUPPORTS_AVX2)
check_cxx_compiler_flag(${ARROW_AVX2_FLAG} CXX_SUPPORTS_AVX2)
check_cxx_compiler_flag(-Wa,-mbig-obj CXX_SUPPORTS_BIG_OBJ)
# check_cxx_compiler_flag() requires that the flags are a string. When flags
check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG})
check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG})
check_cxx_compiler_flag(-O3 BENCHMARK_HAS_O3_FLAG)
check_cxx_compiler_flag("${flag}" "${has_flag}")
check_cxx_compiler_flag(-fprofile-abs-path HAVE_cxx_fprofile_abs_path)
check_cxx_compiler_flag(-W LIBUNWIND_HAS_W_FLAG)
check_cxx_compiler_flag(-Wunused-variable LIBUNWIND_HAS_WUNUSED_VARIABLE_FLAG)
check_cxx_compiler_flag(-Wwrite-strings LIBUNWIND_HAS_WWRITE_STRINGS_FLAG)
check_cxx_compiler_flag(-Wchar-subscripts LIBUNWIND_HAS_WCHAR_SUBSCRIPTS_FLAG)
check_cxx_compiler_flag(-Wmissing-braces LIBUNWIND_HAS_WMISSING_BRACES_FLAG)
check_cxx_compiler_flag(/WX- LIBUNWIND_HAS_NO_WX_FLAG)
check_cxx_compiler_flag(/EHs- LIBUNWIND_HAS_NO_EHS_FLAG)
check_cxx_compiler_flag(/EHa- LIBUNWIND_HAS_NO_EHA_FLAG)
check_cxx_compiler_flag(${FLAG} ${mangled_flag})
check_cxx_compiler_flag("-mllvm -inline-deferral" _has_mllvm_inline_deferral)
check_cxx_compiler_flag("${flag}" ${WARNING_CXX_FLAG_VAR})
check_cxx_compiler_flag(
"-Wclass-memaccess"
SUPPORTS_CLASS_MEMACCESS
)
check_cxx_compiler_flag(
"-Wnon-template-friend"
SUPPORTS_NON_TEMPLATE_FRIEND
)
check_cxx_compiler_flag("${all_cxx_flags_string}" draco_all_cxx_flags_pass)
# Since 3.17.0 check_cxx_compiler_flag() sets a normal variable at
check_cxx_compiler_flag("${cxx_flag}" cxx_flag_test_passed)
# todo use CHECK_CXX_COMPILER_FLAG(-fsanitize=address SUPPORTS_SANITIZER) etc.
check_cxx_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
check_cxx_compiler_flag(-Weffc++ HAVE_WEFFCXX_FLAG)
check_cxx_compiler_flag(-fprofile-abs-path HAVE_fprofile_abs_path)
check_cxx_compiler_flag(
-Wshadow-compatible-local
COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL)
check_cxx_compiler_flag(
-Winconsistent-missing-override
COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE)
check_cxx_compiler_flag("-Werror ${_arg}" _supported_flag)
# check_cxx_compiler_flag("-std=c++17" COMPILER_SUPPORTS_CXX_17)
check_cxx_compiler_flag("-Wno-maybe-uninitialized" _flag_found)
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
check_cxx_compiler_flag("-Wno-c++17-extensions" _flag_found)
check_cxx_compiler_flag("${FLAG}" CXXFLAG${FLAG})
check_cxx_compiler_flag(-Wno-unneeded-internal-declaration HAVE_NO_CXX_UNNEEDED_INTERNAL_DEC)
check_cxx_compiler_flag(-W${flag_name} "HAVE_WFLAG_${flag_name_upper}")
check_cxx_compiler_flag(-fno-fast-math HAVE_FLAG_NO_FAST_MATH)
check_cxx_compiler_flag(-fcx-limited-range HAVE_CX_LIMITED_RANGE)
check_cxx_compiler_flag("-Wno-reserved-identifier" WARN_RESERVED_ID)
CHECK_CXX_COMPILER_FLAG(-Bsymbolic-functions CXX_SUPPORTS_FLAG_BSYMB_FUNCS)
check_cxx_compiler_flag(${flag} CXX_HAS_WARNING${flag_var})
check_cxx_compiler_flag(-std=gnu++0x HAVE_GXX_GNUXX11)
check_cxx_compiler_flag(-std=c++0x HAVE_GXX_CXX11)
check_cxx_compiler_flag("${FLAG}" CXX_HAS${FLAGNAME})
check_cxx_compiler_flag(-fno-exceptions HAVE_FNO_EXCEPTIONS_FLAG)
check_cxx_compiler_flag(-fuse-ld=gold HAVE_GOLD_LINKER_FLAG)
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAGX})
check_cxx_compiler_flag("-tp=grace" COMPILER_SUPPORTS_GRACE_AS_TARGET_PROCESSOR)
check_cxx_compiler_flag("-msve-vector-bits=128" COMPILER_SUPPORTS_SVE_VECTOR_BITS)
check_cxx_compiler_flag(-Wthread-safety HAVE_CLANG_THREAD_SAFETY)
check_cxx_compiler_flag(
"${flag}"
"CXX_SUPPORTS_${name}"
)
check_cxx_compiler_flag("-fsanitize=fuzzer-no-link" CXX_FUZZERS_SUPPORTED)
check_cxx_compiler_flag("-fmacro-prefix-map=OLD=NEW" CXX_MACRO_PREFIX_MAP)
check_cxx_compiler_flag("-mavx2" CXX_MAVX2_SUPPORTED)
check_cxx_compiler_flag("-mf16c" CXX_MF16C_SUPPORTED)
check_cxx_compiler_flag("-mavx512cd" CXX_MAVX512CD_SUPPORTED)
check_cxx_compiler_flag("${cxx_flag}" LIBWEBM_HAVE_CXX_FLAG)
CHECK_CXX_COMPILER_FLAG(${_flag} CXX_FLAG_${varname})
check_cxx_compiler_flag( "-stdlib=libc++" CXX_COMPILER_SUPPORTS_LIBCXX )
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
check_cxx_compiler_flag(${_CCOPT_ON} ${_optvarname})
check_cxx_compiler_flag(-mfp16-format=ieee GGML_COMPILER_SUPPORTS_FP16_FORMAT_I3E)
check_cxx_compiler_flag(-fno-stack-protector BENCHMARK_HAS_FNO_STACK_PROTECTOR_FLAG)
check_cxx_compiler_flag(-O3 BENCHMARK_HAS_O3_FLAG)
check_cxx_compiler_flag("${cxxflags}" ${result})
check_cxx_compiler_flag("/arch:SSE2" COMPILER_SUPPORTS_SSE2)
CHECK_CXX_COMPILER_FLAG("${CUSTOM_CXX_FLAGS} -std=c++14" COMPILER_SUPPORTS_CXX14)
check_cxx_compiler_flag("${cxxflags}" ${result})
check_cxx_compiler_flag(-Wstrict-null-sentinel SNS_SUPPORT)
check_cxx_compiler_flag(-Wno-gnu-anonymous-struct has_w_gnu_anonymous_struct_flag)
check_cxx_compiler_flag(-Wno-dtor-name has_w_dtor_name_flag)
check_cxx_compiler_flag("-Werror -Wextra -Wall -mcx16" has_mcx16_flag)
check_cxx_compiler_flag(-std=c++2a has_std_2a_flag)
check_cxx_compiler_flag(-std=c++1z has_std_1z_flag)
check_cxx_compiler_flag(-Wextra-semi COMPILER_SUPPORTS_EXTRA_SEMI_WARNING)
check_cxx_compiler_flag(-fPIC COMPILER_SUPPORTS_PIC)
check_cxx_compiler_flag(-mlsx COMPILER_SUPPORTS_LSX)
CHECK_CXX_COMPILER_FLAG(-flto CXX_SUPPORTS_FLTO)
CHECK_CXX_COMPILER_FLAG("-mbmi2" HAVE_CLANG_MBMI2)
CHECK_CXX_COMPILER_FLAG("-std=c++11" HAS_STD_CXX11)
check_cxx_compiler_flag(${flag_CLANG} CXX_CHECK_FLAG_${suffix})
check_cxx_compiler_flag(-Wextra CXX_HAS_FLAGS_WEXTRA)
check_cxx_compiler_flag(-mno-float128 _hasflag)
check_cxx_compiler_flag("-Werror=switch" CXX_SUPPORTS_WERROR_SWITCH_FLAG)
check_cxx_compiler_flag("-Werror -Wimplicit-fallthrough" CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG)
check_cxx_compiler_flag("-Werror -Woverloaded-virtual" CXX_SUPPORTS_OVERLOADED_VIRTUAL)
check_cxx_compiler_flag("-Werror -Wnested-anon-types" CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG)
check_cxx_compiler_flag("-Wformat-nonliteral -Werror=format-nonliteral" CXX_SUPPORTS_FORMAT_NONLITERAL_WARNING)
check_cxx_compiler_flag("${flag}" cxx_compiler_flag_${flag}_is_supported)
check_cxx_compiler_flag("/execution-charset:utf-8" res_var)
check_cxx_compiler_flag("-Wextra" TOML11_COMPILER_SUPPORTS_WEXTRA)
check_cxx_compiler_flag("-Wpedantic" TOML11_COMPILER_SUPPORTS_WPEDANTIC)
check_cxx_compiler_flag("-Wshadow" TOML11_COMPILER_SUPPORTS_WSHADOW)
check_cxx_compiler_flag("-mcpu=neoverse-n2" COMPILER_SUPPORTS_NEOVERSE_N2)
check_cxx_compiler_flag(-W SUPPORTS_W_FLAG)
CHECK_CXX_COMPILER_FLAG("${SSE_FLAGS}" HAS_SSE2)
CHECK_CXX_COMPILER_FLAG(${NO_OMIT_FRAME_POINTER_MSVC_FLAG} HAS_MSVC_NO_OMIT_FRAME_POINTER)