Skip to content

Commit

Permalink
Fix warnings as errors for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
daleglass committed Mar 15, 2024
1 parent 3d5afbd commit 40761fb
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 @@ -184,8 +184,13 @@ if(OVERTE_WARNINGS_WHITELIST)
endif()

if(OVERTE_WARNINGS_AS_ERRORS)
set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -Werror")
set(ENV{CFLAGS} "$ENV{CXXFLAGS} -Werror")
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR (CMAKE_CXX_COMPILER_ID MATCHES "" AND WIN32))
set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} /WX")
set(ENV{CFLAGS} "$ENV{CXXFLAGS} /WX")
else()
set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -Werror")
set(ENV{CFLAGS} "$ENV{CXXFLAGS} -Werror")
endif()
endif()


Expand Down

0 comments on commit 40761fb

Please sign in to comment.