cmake: only enable -Wdocumentation for clang-cl

This commit is contained in:
Michele Caini
2022-11-16 10:46:34 +01:00
parent 4af0a3a0d1
commit 262c1f53c1

View File

@@ -62,7 +62,7 @@ function(SETUP_TARGET TARGET_NAME)
-Wno-unused-local-typedef
-Wno-unused-private-field
>
# documentation diagnostic on also for clang-cl
# documentation diagnostic turned on for clang-cl only
$<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wdocumentation>
/EHsc /wd4324 /wd4996
$<$<CONFIG:Debug>:/Od>
@@ -73,7 +73,6 @@ function(SETUP_TARGET TARGET_NAME)
${TARGET_NAME}
PRIVATE
-pedantic -fvisibility=hidden -Wall -Wshadow -Wno-deprecated-declarations
$<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wdocumentation>
$<$<CONFIG:Debug>:-O0 -g>
$<$<CONFIG:Release>:-O2>
)