Browse Source

build: enable -Wcomma on clang (see #1044)

Michele Caini 2 years ago
parent
commit
f1f33a3ac7
1 changed files with 2 additions and 0 deletions
  1. 2 0
      test/CMakeLists.txt

+ 2 - 0
test/CMakeLists.txt

@@ -62,6 +62,8 @@ function(SETUP_TARGET TARGET_NAME)
                 >
                 >
                 # documentation diagnostic turned on for clang-cl only
                 # documentation diagnostic turned on for clang-cl only
                 $<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wdocumentation>
                 $<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wdocumentation>
+                # warnings from compilers that think I don't know what I'm doing
+                $<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","Clang">:-Wcomma>
                 /EHsc /wd4324 /wd4996
                 /EHsc /wd4324 /wd4996
                 # disabling INCREMENTAL is required by SizeBench
                 # disabling INCREMENTAL is required by SizeBench
                 $<$<CONFIG:Debug>:/Od /INCREMENTAL:NO>
                 $<$<CONFIG:Debug>:/Od /INCREMENTAL:NO>