Skip to content

Commit

Permalink
[#555] Fix warning flags for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Dec 20, 2024
1 parent b79b0e3 commit 7c0d189
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ add_rust_feature(
)

if(WARNING_AS_ERROR)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra -Wpedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic")
if(WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra -Wpedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic")
endif()
endif()

if(SANITIZERS)
Expand Down

0 comments on commit 7c0d189

Please sign in to comment.