Skip to content

Commit

Permalink
Enable GCC static analyzer when possible
Browse files Browse the repository at this point in the history
Fixes gbdev#970
  • Loading branch information
ISSOtm committed Nov 9, 2023
1 parent dde9f2b commit 8497da5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ else()
-Wno-type-limits -Wno-tautological-constant-out-of-range-compare
-Wvla # MSVC does not support VLAs
-Wno-unknown-warning-option) # Clang shouldn't diagnose unknown warnings
# Use GCC's static analyzer if available
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "10")
add_compile_options(-fanalyzer)
endif()
endif()
endif()

Expand Down

0 comments on commit 8497da5

Please sign in to comment.