mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 00:16:22 +01:00
Add Address Sanitized build type
- Add -DCMAKE_BUILD_TYPE=ASAN to possible builds
This commit is contained in:
parent
d75ee3f9ce
commit
3d209be3d6
2 changed files with 17 additions and 1 deletions
|
@ -6,6 +6,11 @@ compiler:
|
||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
|
|
||||||
|
env:
|
||||||
|
- BUILD_TYPE=Release
|
||||||
|
- BUILD_TYPE=Debug
|
||||||
|
- BUILD_TYPE=ASAN
|
||||||
|
|
||||||
arch:
|
arch:
|
||||||
packages:
|
packages:
|
||||||
- cmake
|
- cmake
|
||||||
|
@ -19,7 +24,7 @@ arch:
|
||||||
- wlc-git
|
- wlc-git
|
||||||
- libcap
|
- libcap
|
||||||
script:
|
script:
|
||||||
- "cmake ."
|
- "cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ."
|
||||||
- "make"
|
- "make"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -9,6 +9,17 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||||
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror)
|
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror)
|
||||||
|
|
||||||
|
# Add Address Sanitiezed build type
|
||||||
|
set(CMAKE_C_FLAGS_ASAN
|
||||||
|
"${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -fno-omit-frame-pointer"
|
||||||
|
CACHE STRING "Flags used by the C compiler during address sanitizer builds."
|
||||||
|
FORCE )
|
||||||
|
mark_as_advanced(
|
||||||
|
CMAKE_C_FLAGS_ASAN
|
||||||
|
CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||||
|
CMAKE_SHARED_LINKER_FLAGS_DEBUG
|
||||||
|
)
|
||||||
|
|
||||||
list(INSERT CMAKE_MODULE_PATH 0
|
list(INSERT CMAKE_MODULE_PATH 0
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake
|
${CMAKE_CURRENT_SOURCE_DIR}/CMake
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue