diff options
Diffstat (limited to 'toolsrc/cmake')
| -rw-r--r-- | toolsrc/cmake/utilities.cmake | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/toolsrc/cmake/utilities.cmake b/toolsrc/cmake/utilities.cmake index 9523b9d97..4b434a9c7 100644 --- a/toolsrc/cmake/utilities.cmake +++ b/toolsrc/cmake/utilities.cmake @@ -204,7 +204,13 @@ function(vcpkg_target_add_warning_options TARGET) if(VCPKG_DEVELOPMENT_WARNINGS) target_compile_options(${TARGET} PRIVATE -W4) if(VCPKG_COMPILER STREQUAL "clang") - target_compile_options(${TARGET} PRIVATE -Wmissing-prototypes -Wno-missing-field-initializers) + # -Wno-range-loop-analysis is due to an LLVM bug which will be fixed in a + # future version of clang https://reviews.llvm.org/D73007 + target_compile_options(${TARGET} PRIVATE + -Wmissing-prototypes + -Wno-missing-field-initializers + -Wno-range-loop-analysis + ) else() target_compile_options(${TARGET} PRIVATE -analyze) endif() @@ -219,13 +225,21 @@ function(vcpkg_target_add_warning_options TARGET) if(VCPKG_DEVELOPMENT_WARNINGS) target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Wpedantic - -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-redundant-move) + -Wno-unknown-pragmas + -Wno-missing-field-initializers + -Wno-redundant-move + ) # GCC and clang have different names for the same warning if(VCPKG_COMPILER STREQUAL "gcc") - target_compile_options(${TARGET} PRIVATE -Wmissing-declarations) + target_compile_options(${TARGET} PRIVATE + -Wmissing-declarations + ) elseif(VCPKG_COMPILER STREQUAL "clang") - target_compile_options(${TARGET} PRIVATE -Wmissing-prototypes) + target_compile_options(${TARGET} PRIVATE + -Wmissing-prototypes + -Wno-range-loop-analysis + ) endif() endif() |
