Skip to content

Commit

Permalink
Fix debug builds for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHelmut committed Mar 23, 2024
1 parent 5cb4b81 commit dc60751
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,28 @@ Checks: >
-objc-*,
-zircon-*,
-llvm*,
-hicpp*,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-readability-magic-numbers,
-readability-function-cognitive-complexity,
-misc-non-private-member-variables-in-classes,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-misc-static-assert,
-modernize-use-trailing-return-type,
-modernize-use-nullptr,
-bugprone-easily-swappable-parameters,
-bugprone-exception-escape,
-cert-env33-c,
-cert-err58-cpp
# -modernize-use-nullptr is deactivated for x86
# See: https://github.com/llvm/llvm-project/issues/53778

WarningsAsErrors: '*'
HeaderFilterRegex: ''
FormatStyle: none
Expand Down
4 changes: 4 additions & 0 deletions cmake/StaticAnalyzers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Release")
if (CLANGTIDY)
message(STATUS "Using clang-tidy")
set(CMAKE_CXX_CLANG_TIDY "${CLANGTIDY};-extra-arg=-Wno-unknown-warning-option")
# Explicitly enable exceptions on Windows
if (WIN32)
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY};--extra-arg=/EHsc")
endif ()
else ()
message(WARNING "clang-tidy requested but executable not found")
endif ()
Expand Down

0 comments on commit dc60751

Please sign in to comment.