add werror flags when making a debug build using llvm (#4338)
this would get bugs like https://github.com/Cockatrice/Cockatrice/pull/4337 get signalled earlier to us
This commit is contained in:
parent
8fb561b4c4
commit
890810f5b9
1 changed files with 5 additions and 1 deletions
|
@ -134,7 +134,11 @@ ELSEIF (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
ELSE()
|
ELSE()
|
||||||
# other: osx/llvm, bsd/llvm
|
# other: osx/llvm, bsd/llvm
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
if(WARNING_AS_ERROR)
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -Werror")
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra")
|
||||||
|
endif()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# GNU systems need to define the Mersenne exponent for the RNG to compile w/o warning
|
# GNU systems need to define the Mersenne exponent for the RNG to compile w/o warning
|
||||||
|
|
Loading…
Reference in a new issue