Skip to content

Commit

Permalink
Enable "-pedantic-errors" only when BENCHMARK_ENABLE_WERROR is ON
Browse files Browse the repository at this point in the history
  • Loading branch information
BraynStorm committed Mar 30, 2024
1 parent f3ec7b8 commit 20b09cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ else()
add_cxx_compiler_flag(-Wconversion)
if(BENCHMARK_ENABLE_WERROR)
add_cxx_compiler_flag(-Werror)
add_cxx_compiler_flag(-pedantic-errors)
endif()
if (NOT BENCHMARK_ENABLE_TESTING)
# Disable warning when compiling tests as gtest does not use 'override'.
add_cxx_compiler_flag(-Wsuggest-override)
endif()
add_cxx_compiler_flag(-pedantic)
add_cxx_compiler_flag(-pedantic-errors)
add_cxx_compiler_flag(-Wshorten-64-to-32)
add_cxx_compiler_flag(-fstrict-aliasing)
# Disable warnings regarding deprecated parts of the library while building
Expand Down

0 comments on commit 20b09cf

Please sign in to comment.