Răsfoiți Sursa

cmake: enable documentation diagnostic for clang

Michele Caini 3 ani în urmă
părinte
comite
2c48cc10ae
1 a modificat fișierele cu 11 adăugiri și 1 ștergeri
  1. 11 1
      test/CMakeLists.txt

+ 11 - 1
test/CMakeLists.txt

@@ -54,7 +54,16 @@ function(SETUP_TARGET TARGET_NAME)
                 # vs2017 emits too many false positives for my tastes
                 # vs2017 emits too many false positives for my tastes
                 $<IF:$<EQUAL:${MSVC_TOOLSET_VERSION},141>, /W1, /W4>
                 $<IF:$<EQUAL:${MSVC_TOOLSET_VERSION},141>, /W1, /W4>
                 # clang-cl goes a little wrong with some warnings instead
                 # 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>
+                $<$<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
+                >
+                # documentation diagnostic on also for clang-cl
+                $<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wdocumentation>
                 /EHsc /wd4324 /wd4996
                 /EHsc /wd4324 /wd4996
                 $<$<CONFIG:Debug>:/Od>
                 $<$<CONFIG:Debug>:/Od>
                 $<$<CONFIG:Release>:/O2>
                 $<$<CONFIG:Release>:/O2>
@@ -64,6 +73,7 @@ function(SETUP_TARGET TARGET_NAME)
             ${TARGET_NAME}
             ${TARGET_NAME}
             PRIVATE
             PRIVATE
                 -pedantic -fvisibility=hidden -Wall -Wshadow -Wno-deprecated-declarations
                 -pedantic -fvisibility=hidden -Wall -Wshadow -Wno-deprecated-declarations
+                $<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wdocumentation>
                 $<$<CONFIG:Debug>:-O0 -g>
                 $<$<CONFIG:Debug>:-O0 -g>
                 $<$<CONFIG:Release>:-O2>
                 $<$<CONFIG:Release>:-O2>
         )
         )