Skip to content

Commit

Permalink
Treat warnings as errors for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
fsb4000 committed Aug 19, 2024
1 parent 79b0ade commit e077f30
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 @@ -150,6 +150,10 @@ if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)

if(BENCHMARK_ENABLE_WERROR)
add_cxx_compiler_flag(-WX)
endif()

if (NOT BENCHMARK_ENABLE_EXCEPTIONS)
add_cxx_compiler_flag(-EHs-)
add_cxx_compiler_flag(-EHa-)
Expand Down

0 comments on commit e077f30

Please # to comment.