Explorar el Código

cmake: enable documentation diagnostic for clang

Michele Caini hace 3 años
padre
commit
2c48cc10ae
Se han modificado 1 ficheros con 11 adiciones y 1 borrados
  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
                 $<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>
+                $<$<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
                 $<$<CONFIG:Debug>:/Od>
                 $<$<CONFIG:Release>:/O2>
@@ -64,6 +73,7 @@ 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>
         )