diff options
author | vaxerski <[email protected]> | 2023-06-01 17:08:11 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-06-01 17:08:11 +0200 |
commit | 9cf72a30fc040f0bd2fb4651ec7f8e82df962278 (patch) | |
tree | d674db37ce1fd4074d4c41ad97e1c669c0748c65 /CMakeLists.txt | |
parent | e76bd43f53197af2c64608ba6b0792326e79db07 (diff) | |
download | Hyprland-9cf72a30fc040f0bd2fb4651ec7f8e82df962278.tar.gz Hyprland-9cf72a30fc040f0bd2fb4651ec7f8e82df962278.zip |
debug: add WITH_ASAN flag in cmake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cafdd94f..b5943e74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,9 +96,12 @@ add_executable(Hyprland ${SRCFILES}) if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) message(STATUS "Setting debug flags") - target_link_libraries(Hyprland asan) + if (WITH_ASAN) + target_link_libraries(Hyprland asan) + add_compile_options(-fsanitize=address) + endif() - add_compile_options(-pg -no-pie -fno-builtin -fsanitize=address) + add_compile_options(-pg -no-pie -fno-builtin) add_link_options(-pg -no-pie -fno-builtin) endif() |