Skip to content

Commit 01e17b7

Browse files
committed
Enable -Werror in developer build
1 parent a352cf7 commit 01e17b7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cmake/helpers.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,9 @@ function(add_umf_target_compile_options name)
244244
target_compile_definitions(${name} PRIVATE -D_FORTIFY_SOURCE=2)
245245
endif()
246246
if(UMF_DEVELOPER_MODE)
247-
target_compile_options(${name} PRIVATE -fno-omit-frame-pointer
248-
-fstack-protector-strong)
247+
target_compile_options(
248+
${name} PRIVATE -fno-omit-frame-pointer
249+
-fstack-protector-strong -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)