Skip to content

Commit 85981f5

Browse files
committed
Revert "CMAKE_COMPILE_WARNING_AS_ERROR does not seem to work"
This reverts commit 6ce457e.
1 parent 6ce457e commit 85981f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ set(_picky "")
4747

4848
option(TRURL_WERROR "Turn compiler warnings into errors" OFF)
4949
if(TRURL_WERROR)
50-
if(MSVC)
50+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
51+
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
52+
elseif(MSVC)
5153
list(APPEND _picky "-WX")
5254
else() # llvm/clang and gcc style options
5355
list(APPEND _picky "-Werror")

0 commit comments

Comments
 (0)