mirror of
https://github.com/overte-org/overte.git
synced 2025-04-05 23:32:58 +02:00
Fix warnings as errors for MSVC
This commit is contained in:
parent
3d5afbdd31
commit
40761fb545
1 changed files with 7 additions and 2 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue