Skip to content

Commit 48485b3

Browse files
committed
Enable -Werror in developer build
1 parent a352cf7 commit 48485b3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cmake/helpers.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ function(add_umf_target_compile_options name)
245245
endif()
246246
if(UMF_DEVELOPER_MODE)
247247
target_compile_options(${name} PRIVATE -fno-omit-frame-pointer
248-
-fstack-protector-strong)
248+
-fstack-protector-strong
249+
-Werror)
249250
endif()
250251
if(UMF_USE_COVERAGE)
251252
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")

test/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ function(build_umf_test)
7171
# tests retrieve arguments using 'GetParam()', which applies a 'const'
7272
# qualifier often discarded in the test scenarios.
7373
target_compile_options(${TEST_TARGET_NAME} PRIVATE -Wno-cast-qual)
74-
endif()
7574

75+
if(UMF_DEVELOPER_MODE)
76+
target_compile_options(${TEST_TARGET_NAME} PRIVATE -Werror)
77+
endif()
78+
endif()
7679
target_link_directories(${TEST_TARGET_NAME} PRIVATE ${LIB_DIRS})
7780

7881
target_include_directories(

0 commit comments

Comments
 (0)