target_compile_options(<target> [BEFORE] <INTERFACE|PUBLIC|PRIVATE> [items1...] [<INTERFACE|PUBLIC|PRIVATE> [items2...] ...])
target_compile_options(<target> [BEFORE] <INTERFACE|PUBLIC|PRIVATE> [items1...] [<INTERFACE|PUBLIC|PRIVATE> [items2...] ...])
target_compile_options(gtest PRIVATE -fno-exceptions)
target_compile_options(VkLayer_khronos_validation PRIVATE "$<$<CONFIG:Release>:/Zi>")
target_compile_options(${WB_TARGET} INTERFACE ${WB_COMPILER_OPTIONS_INTERFACE} PRIVATE ${WB_COMPILER_OPTIONS_PRIVATE} ${WB_COMPILER_OPTIONS_PRIVATE_COVERAGE_NEW})
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
target_compile_options(${PROJECT_NAME} PRIVATE
$<$<CONFIG:Debug>:
/Od
>
$<$<CONFIG:Release>:
/O2;
/Gy
>
/permissive-;
/Oi;
/sdl;
/Oy-;
/W3;
${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT};
/Ot;
/TP;
/wd4244;
/wd4101;
/wd4018;
/wd4305;
${DEFAULT_CXX_EXCEPTION_HANDLING}
)
target_compile_options(libmorton-test-bmi2
PRIVATE
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>: # GCC and clang
-march=haswell -Wall -Wextra -Wpedantic>
$<$<CXX_COMPILER_ID:MSVC>: # MSVC
/arch:AVX2 /W3>
)
target_compile_options(${PYBINDIMATH_LIBRARY} PRIVATE /bigobj)
target_compile_options(Interop
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W4>
$<$<CXX_COMPILER_ID:MSVC>:/WX>
$<$<CXX_COMPILER_ID:MSVC>:/wd4611>
$<$<CXX_COMPILER_ID:MSVC>:/MP>
$<$<CXX_COMPILER_ID:MSVC>:/D_CRT_SECURE_NO_WARNINGS /D_SCL_NO_WARNINGS>
$<$<CXX_COMPILER_ID:GNU>:-pedantic>
$<$<CXX_COMPILER_ID:GNU>:-pedantic-errors>
$<$<CXX_COMPILER_ID:GNU>:-Wall>
$<$<CXX_COMPILER_ID:GNU>:-Wextra>
$<$<CXX_COMPILER_ID:GNU>:-Werror>
$<$<CXX_COMPILER_ID:GNU>:-Wno-float-equal>
$<$<CXX_COMPILER_ID:GNU>:-Wno-padded>
$<$<CXX_COMPILER_ID:Clang>:-pedantic>
$<$<CXX_COMPILER_ID:Clang>:-pedantic-errors>
$<$<CXX_COMPILER_ID:Clang>:-Wall>
$<$<CXX_COMPILER_ID:Clang>:-Wextra>
$<$<CXX_COMPILER_ID:Clang>:-Werror>
$<$<CXX_COMPILER_ID:Clang>:-Wno-c++98-compat>
$<$<CXX_COMPILER_ID:Clang>:-Wno-c++98-compat-pedantic>
$<$<CXX_COMPILER_ID:Clang>:-Wno-float-equal>
$<$<CXX_COMPILER_ID:Clang>:-Wno-padded>
$<$<CXX_COMPILER_ID:Clang>:-Wno-reserved-id-macro>
$<$<CXX_COMPILER_ID:Clang>:-Wno-nullability-extension>
$<$<AND:$<CXX_COMPILER_ID:Clang>,$<VERSION_GREATER_EQUAL:${CMAKE_CXX_COMPILER_VERSION},15.0.0>>:-Wno-unused-but-set-variable>
$<$<CXX_COMPILER_ID:AppleClang>:-pedantic>
$<$<CXX_COMPILER_ID:AppleClang>:-pedantic-errors>
$<$<CXX_COMPILER_ID:AppleClang>:-Wall>
$<$<CXX_COMPILER_ID:AppleClang>:-Wextra>
$<$<CXX_COMPILER_ID:AppleClang>:-Werror>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-c++98-compat>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-c++98-compat-pedantic>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-float-equal>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-padded>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-reserved-id-macro>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-nullability-extension>
$<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_GREATER_EQUAL:${CMAKE_CXX_COMPILER_VERSION},15.0.0>>:-Wno-unused-but-set-variable>
)
target_compile_options(CXEngine PRIVATE /wd4819 )
target_compile_options(${name} PRIVATE ${_flag_list})
target_compile_options(${target_name} PUBLIC ${f3d_compile_options_public} PRIVATE ${f3d_compile_options_private})
target_compile_options(Fem PRIVATE /wd4275)
target_compile_options(${TARGET} PRIVATE
/nologo # Silence MSVC compiler version output.
$<$<BOOL:${REPROC_WARNINGS_AS_ERRORS}>:/WX> # -Werror
$<$<BOOL:${REPROC_HAVE_PERMISSIVE}>:/permissive->
)
target_compile_options(${target} PRIVATE -ffile-prefix-map=${CMAKE_SOURCE_DIR}=)
target_compile_options(Clipper2 PRIVATE -Wno-error=template-id-cdtor)
target_compile_options( astc PRIVATE /wd4244 )
target_compile_options( ${PROJECT_NAME} PRIVATE "$<$<CONFIG:Release>:/Zi>" )
target_compile_options(SDL3-shared PRIVATE "/arch:SSE")
target_compile_options(muFFT PRIVATE ${MUFFT_C_FLAGS})
target_compile_options(
${PROJECT_NAME}
PRIVATE /MP
/W4
/wd4251
/wd4592
/wd4127
/Zm200
$<$<CONFIG:Release>:
/Gw
/GS-
/GL
/GF
>
PUBLIC
)
target_compile_options(assimp PRIVATE -Wno-shorten-64-to-32 -Wno-unused-but-set-variable -Wno-deprecated-declarations)
target_compile_options(${TG} PRIVATE "-fno-rtti")
target_compile_options(imgui_gradient PRIVATE /W4)
target_compile_options(gtest PRIVATE $<$<CXX_COMPILER_ID:Clang>:-Wno-missing-field-initializers>)
target_compile_options(${project} PRIVATE /Zi /O2 /Ob2)
target_compile_options(${TARGET_NAME} PRIVATE "/WX-")
target_compile_options(${target}
PRIVATE /interface /ifcOutput ${BMI}
INTERFACE /reference fmt=${BMI})
TARGET_COMPILE_OPTIONS(${APP_FUSION} PRIVATE -std=c++11)
target_compile_options(HQLauncher PRIVATE
"$<$<CONFIG:Debug>:/Yu>"
"$<$<CONFIG:Release>:/Yu>"
)
target_compile_options(demo PRIVATE -Wall -Wextra -Wpedantic)
target_compile_options(${target} PRIVATE
-Wno-unknown-warning-option
)
target_compile_options(benchmark PRIVATE -w)
target_compile_options(${_TARGET_NAME} PRIVATE "--diag_suppress 185")
target_compile_options(protoc PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W0>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-w>
)
target_compile_options(cppdap-unittests PRIVATE "/wd4244")
target_compile_options(${target} PRIVATE ${warn_${level}})
target_compile_options(MLNQtCore PRIVATE "/MP")
target_compile_options(rubyengine PRIVATE
$<${is_msvc_genex}:/bigobj>
)
target_compile_options(${testname} PRIVATE -Wno-deprecated)
target_compile_options(yaml PRIVATE -Wno-deprecated-declarations)
target_compile_options(Library-C++ PRIVATE -Wall -pedantic -Wno-gnu-zero-variadic-macro-arguments)
target_compile_options(igl_${module_name} PRIVATE /w)
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-c23-extensions>)
target_compile_options(${PROJECT_NAME} PRIVATE -Werror)
target_compile_options(debug_demo PRIVATE "/WX-")
target_compile_options(${FENESTRA_PLUGIN_NAME} PRIVATE -DFENESTRA_PLUGIN_FEATURES_CONTENT=${FEATURE_DEFINE_CONTENT})
target_compile_options(gtest PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/wd4512>)
target_compile_options(${TARGET} PRIVATE ${FLAG})
target_compile_options(${NAME_} PRIVATE
--expt-relaxed-constexpr)
target_compile_options(
mlx
PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:--static-global-template-stub=false>")
target_compile_options(pinloki-core PRIVATE "-Wno-deprecated-builtins")
target_compile_options(_diskannpy PRIVATE /U_WINDLL)
target_compile_options(${TARGET}_version PRIVATE
$<TARGET_PROPERTY:${TARGET},INTERFACE_COMPILE_OPTIONS>
$<TARGET_PROPERTY:${TARGET},COMPILE_OPTIONS>)
target_compile_options(${target_name} PRIVATE ${LIBUNWIND_CFLAGS_OTHER})
target_compile_options(${TARGET_NAME} PRIVATE
"-g"
"-gcodeview"
"-fms-hotpatch"
"-ffunction-sections"
"-Xclang-mno-constructor-aliases"
)
target_compile_options(signal_generator_gr_blocks
PRIVATE
$<$<CONFIG:Release>:-O0>
$<$<CONFIG:RelWithDebInfo>:-O0>
)
target_compile_options(OSDependent PRIVATE -fpermissive)
target_compile_options(openthread-simulation PRIVATE
${OT_CFLAGS}
)
target_compile_options(${us_em_test_exe_name} PRIVATE -DGTEST_LINKED_AS_SHARED_LIBRARY)
target_compile_options(${the_target} PRIVATE "$<$<CONFIG:Release>:${OPENCV_TEST_EXTRA_CXX_FLAGS_Release}>")
target_compile_options(dspfilters PRIVATE -O3 -march=native)
target_compile_options(wxSQLite3 PRIVATE -std=c++11)
target_compile_options(memcpy PRIVATE -fno-builtin-memcpy)
target_compile_options(${target} PRIVATE -g)
target_compile_options(glfw_minimal PRIVATE "-Wall")
target_compile_options(${ARGV0} PRIVATE /W4)
target_compile_options(${target_name} PRIVATE /W4)
target_compile_options(crash_handler PRIVATE -DBUILD_WITH_ICU)
target_compile_options(utils_avx512 PRIVATE -mf16c -mavx512f -mavx512dq
-mavx512bw)
target_compile_options(nsharp PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
target_compile_options(openmw_settings_access_benchmark PRIVATE --coverage)
target_compile_options(tinyxml2_objs PRIVATE -Wno-suggest-attribute=format)
target_compile_options(scram-cli PRIVATE $<$<CONFIG:DEBUG>:${SCRAM_CXX_FLAGS_DEBUG}>)
target_compile_options(
DataFrame
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/bigobj>
$<$<CXX_COMPILER_ID:MSVC>:/wd4251>
$<$<CXX_COMPILER_ID:MSVC>:/wd5030>
$<$<CXX_COMPILER_ID:MSVC>:/wd5222>
# TODO: fix these warnings
PUBLIC $<$<CXX_COMPILER_ID:MSVC>:/wd4244>
$<$<CXX_COMPILER_ID:MSVC>:/wd4267>
$<$<CXX_COMPILER_ID:MSVC>:/wd4996>
)
target_compile_options(${name} PRIVATE ${WERROR_FLAG})
target_compile_options(${targetName} PRIVATE "/Zc:__cplusplus")
target_compile_options(vigra_with_dip PRIVATE -Wno-conversion -Wno-sign-conversion -Wno-deprecated-copy -Wno-parentheses)
target_compile_options(${PROJECT_NAME} PRIVATE ${flag})
target_compile_options(${PROJECT_NAME} PRIVATE
$<$<CONFIG:Release>:
/Oi;
/Gy
>
)
target_compile_options(${target_name}
PUBLIC ${COMPILE_OPTIONS_PUBLIC}
PRIVATE ${COMPILE_OPTIONS_PRIVATE}
INTERFACE ${COMPILE_OPTIONS_INTERFACE}
${ARG_COMPILE_OPTIONS})
target_compile_options(Kaleidoscope-Ch2 PRIVATE
-Wno-unused-private-field
)
target_compile_options(capstone PRIVATE -Wno-unused-function)
target_compile_options(ReflexLibStatic PRIVATE ${simd_flags})
target_compile_options(seastar
PUBLIC
# required by any target that links to seastar
"-Wno-non-virtual-dtor"
PRIVATE
"-DSEASTAR_NO_EXCEPTION_HACK"
"-Wno-error"
"-Wno-sign-compare"
"-Wno-attributes"
"-Wno-pessimizing-move"
"-Wno-address-of-packed-member")
target_compile_options(${target} PRIVATE -Werror)
target_compile_options(colmap_util_string_test PRIVATE /utf-8)
target_compile_options(ixwebsocket PRIVATE /MP)
target_compile_options(proj PRIVATE /Zi /Zf)
target_compile_options(${target} PRIVATE -Werror)
target_compile_options(Path PRIVATE "/permissive-")
target_compile_options(TracyClient PRIVATE /W0)
target_compile_options(${Name} PRIVATE -fPIC)
target_compile_options(${_ADDLIB_LIB} PRIVATE "-pthread")
target_compile_options(${target_name} PRIVATE /W4 /wd4189)
target_compile_options(${DICT}Dict PRIVATE "-w")
target_compile_options(${name} PRIVATE ${WERROR_FLAG})
target_compile_options(
cudf
PRIVATE -Wno-non-virtual-dtor -Wno-missing-field-initializers -Wno-deprecated-copy -Wno-restrict
)
target_compile_options(${TARGET} PRIVATE /openmp)
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Werror>)
target_compile_options(${TARGET} PRIVATE "-fobjc-arc")