Skip to content

Commit 51adadb

Browse files
committed
enable warnings and run sanitizers in CI
1 parent 74326a4 commit 51adadb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
os: [windows-latest, macos-latest, ubuntu-latest]
1717
shared: [true, false]
18-
build_type: [Release]
18+
build_type: [CI]
1919
include:
2020
- os: windows-latest
2121
triplet: x64-windows

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ SET(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} --coverage")
2727
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_DEBUG} --coverage")
2828
SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} --coverage")
2929

30+
############################################################
31+
# add new CMAKE_BUILD_TYPE CI
32+
############################################################
33+
set(SANITIZE_OPTIONS "-fsanitize=address -fsanitize=leak -fsanitize=undefined")
34+
SET(CMAKE_CXX_FLAGS_CI "${CMAKE_CXX_FLAGS_RELEASE} -Wall -Wextra -fno-omit-frame-pointer ${SANITIZE_OPTIONS}")
35+
SET(CMAKE_EXE_LINKER_FLAGS_CI "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${SANITIZE_OPTIONS}")
36+
SET(CMAKE_SHARED_LINKER_FLAGS_CI "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${SANITIZE_OPTIONS}")
37+
3038
############################################################
3139
# user config options
3240
############################################################

0 commit comments

Comments
 (0)