Skip to content

Commit 459f835

Browse files
authored
Set CMAKE_COMPILE_WARNING_AS_ERROR
1 parent 9527e17 commit 459f835

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
5757
endif()
5858
add_compile_options(-Wno-shift-negative-value)
5959
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
60-
option(CMAKE_COMPILE_WARNING_AS_ERROR "Treat compiler warnings as errors." ON)
61-
mark_as_advanced(CMAKE_COMPILE_WARNING_AS_ERROR)
60+
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
6261
else()
6362
add_compile_options(-Werror)
6463
endif()

0 commit comments

Comments
 (0)