Skip to content

Commit

Permalink
remove strinct warnings check from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Sep 22, 2023
1 parent 29bcef4 commit eb84172
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,6 @@ function(add_example file mode lib)
target_link_libraries(${target} PUBLIC ${lib})
set_property(TARGET ${target} PROPERTY LANGUAGE CXX)
set_property(TARGET ${target} PROPERTY CXX_STANDARD 17)

# Enable all warnings and treat warnings as errors only when building examples.
# Supposedly, enabling it for examples only, but not for the library target itself
# is a good compromise. It guarantees the continuous checking the code and do not
# breaks dependent projects if warnings are mistakenly introduced in the library.
if(MSVC)
target_compile_options(${target} PRIVATE /W4 /WX)
else()
target_compile_options(${target} PRIVATE
-Wall
-Wextra
-Wpedantic
-Werror)
endif()

endfunction()

function(add_examples glob mode lib)
Expand Down

0 comments on commit eb84172

Please sign in to comment.