cmake: suppress some warnings for clang-cl, it goes a little wrong otherwise

This commit is contained in:
Michele Caini
2022-11-07 15:47:21 +01:00
parent dec3b7bb39
commit d0ea8f4f96

View File

@@ -53,6 +53,8 @@ function(SETUP_TARGET TARGET_NAME)
PRIVATE
# vs2017 emits too many false positives for my tastes
$<IF:$<EQUAL:${MSVC_TOOLSET_VERSION},141>, /W1, /W4>
# clang-cl goes a little wrong with some warnings instead
$<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unknown-warning-option -Wno-exceptions -Wno-unused-local-typedef -Wno-unused-private-field>
/EHsc /wd4324 /wd4996
$<$<CONFIG:Debug>:/Od>
$<$<CONFIG:Release>:/O2>