mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2025-12-23 22:37:53 -05:00
Build: Add CMake option to enable Werror
With -DENABLE_WERROR the -Werror flag will be passed to the compiler failing the build if a warning is emitted.
This commit is contained in:
@@ -5,6 +5,12 @@ target_compile_options(zm-warning-interface
|
||||
-Wimplicit-fallthrough
|
||||
-Wno-unused-parameter)
|
||||
|
||||
if(ENABLE_WERROR)
|
||||
target_compile_options(zm-warning-interface
|
||||
INTERFACE
|
||||
-Werror)
|
||||
endif()
|
||||
|
||||
if(ASAN)
|
||||
target_compile_options(zm-compile-option-interface
|
||||
INTERFACE
|
||||
|
||||
@@ -9,6 +9,12 @@ target_compile_options(zm-warning-interface
|
||||
-Wno-unused-parameter
|
||||
-Woverloaded-virtual)
|
||||
|
||||
if(ENABLE_WERROR)
|
||||
target_compile_options(zm-warning-interface
|
||||
INTERFACE
|
||||
-Werror)
|
||||
endif()
|
||||
|
||||
if(ASAN)
|
||||
target_compile_options(zm-compile-option-interface
|
||||
INTERFACE
|
||||
|
||||
Reference in New Issue
Block a user