Skip to content

Commit

Permalink
Add ENABLE_WARNINGS option
Browse files Browse the repository at this point in the history
Co-authored-by: David Ellis <[email protected]>
  • Loading branch information
kou and dfellis authored Apr 26, 2024
1 parent 1d5bbf5 commit 5a6cea4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ endif()

set(H3_COMPILE_FLAGS "")
set(H3_LINK_FLAGS "")
if(WIN32)
list(APPEND H3_COMPILE_FLAGS /W2)
else()
list(APPEND H3_COMPILE_FLAGS -Wall)
option(ENABLE_WARNINGS "Enables compiler warnings" ON)
if(ENABLE_WARNINGS)
if(WIN32)
list(APPEND H3_COMPILE_FLAGS /W2)
else()
list(APPEND H3_COMPILE_FLAGS -Wall)
endif()
endif()

if(NOT WIN32)
Expand Down

0 comments on commit 5a6cea4

Please sign in to comment.