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(loader-unknown-chain PUBLIC "$<$<CONFIG:DEBUG>:${LOCAL_C_FLAGS_REL}>")
target_compile_options(${WB_TARGET} INTERFACE ${WB_COMPILER_OPTIONS_INTERFACE} PRIVATE ${WB_COMPILER_OPTIONS_PRIVATE} ${WB_COMPILER_OPTIONS_PRIVATE_COVERAGE_NEW})
target_compile_options(easy_profiler PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
target_compile_options (${TARGET_NAME} PUBLIC /utf-8)
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(${dest_target} INTERFACE $<GENEX_EVAL:$<TARGET_PROPERTY:${source_target_de_alias},INTERFACE_COMPILE_OPTIONS>>)
target_compile_options(Fem PRIVATE /wd4275)
target_compile_options(Jolt PUBLIC /arch:AVX512)
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(${PROJECT_NAME} PUBLIC ${HK_COMPILER_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(LowLevel PUBLIC "-malign-double")
target_compile_options(imgui_gradient PRIVATE /W4)
target_compile_options(ramses-build-options-base INTERFACE -Wno-implicit-fallthrough)
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 (OcctImportJS PUBLIC "$<$<CONFIG:Debug>:-gsource-map>")
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(alpaka INTERFACE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4505>")
target_compile_options(protoc PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W0>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-w>
)
target_compile_options(${target} PUBLIC "-fsanitize=memory")
target_compile_options(${target} PRIVATE ${warn_${level}})
target_compile_options(MLNQtCore PRIVATE "/MP")
target_compile_options(csharp_warnings INTERFACE "$<${is_gnu_or_clang_genex}:-Wno-deprecated-declarations>")
target_compile_options(${PROJECT_NAME} PUBLIC "$<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-fvisibility=hidden>")
target_compile_options(${testname} PRIVATE -Wno-deprecated)
target_compile_options(yaml PRIVATE -Wno-deprecated-declarations)
target_compile_options(${PROJECT_NAME}_headers INTERFACE ${PUBLIC_OPTIONS})
target_compile_options(Library-C++ PRIVATE -Wall -pedantic -Wno-gnu-zero-variadic-macro-arguments)
target_compile_options(igl_common INTERFACE "/MD$<$<CONFIG:Debug>:d>")
target_compile_options(ngstd PUBLIC ${NGSOLVE_COMPILE_OPTIONS})
target_compile_options(MtKaHyPar-BuildFlags INTERFACE -fprofile-arcs -ftest-coverage -fprofile-update=atomic)
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-c23-extensions>)
target_compile_options(${PROJECT_NAME} PUBLIC -fexceptions)
target_compile_options("${TARGET_NAME}"
INTERFACE "$<BUILD_INTERFACE:${lang_flags_if_has_secret_prop}>"
)
target_compile_options(debug_demo PRIVATE "/WX-")
target_compile_options(${FENESTRA_PLUGIN_NAME} PRIVATE -DFENESTRA_PLUGIN_FEATURES_CONTENT=${FEATURE_DEFINE_CONTENT})
target_compile_options(${Target} ${Scope} -isystem${Arg})
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(performous PUBLIC -Werror)
target_compile_options(${us_em_test_exe_name} PRIVATE -DGTEST_LINKED_AS_SHARED_LIBRARY)
target_compile_options(acsdkAssetsMocks PUBLIC
-Wno-deprecated-declarations
)
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(matx INTERFACE ${OpenMP_CXX_FLAGS})
target_compile_options(${target} ${visibility} -fsanitize=address)
TARGET_COMPILE_OPTIONS(${_target} PUBLIC -DSOURCE_DIR="${CMAKE_SOURCE_DIR}/tests/${_dir}/")
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(paraviewbuild
INTERFACE
"$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:${lang}>:${flag}>>")
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(${library} INTERFACE -mcpu=apple-m1)
target_compile_options( InterSpecLib PUBLIC $<$<CONFIG:Release>:/MP> )
target_compile_options(ghc_filesystem INTERFACE "$<$<C_COMPILER_ID:MSVC>:/utf-8>")
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(CovidSim PUBLIC "SHELL:-fp-model precise")
target_compile_options(${PROJECT_NAME} PRIVATE
$<$<CONFIG:Release>:
/Oi;
/Gy
>
)
target_compile_options(
${_TARG_TARGET} ${_TARG_MODE}
$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${_FLAG}>)
target_compile_options(${target_name}
PUBLIC ${COMPILE_OPTIONS_PUBLIC}
PRIVATE ${COMPILE_OPTIONS_PRIVATE}
INTERFACE ${COMPILE_OPTIONS_INTERFACE}
${ARG_COMPILE_OPTIONS})
target_compile_options(pasta_cxx_settings INTERFACE ${CXX_WARNING_OPTIONS})
target_compile_options(Kaleidoscope-Ch2 PRIVATE
-Wno-unused-private-field
)
target_compile_options(${ARGV1} ${TYPE} $<$<COMPILE_LANGUAGE:CXX>:${ARGV0}>)