build: add asan enable status flag

This commit is contained in:
vaxerski 2023-07-16 17:06:05 +02:00
parent 3229862dd4
commit b156a9654f
1 changed files with 2 additions and 0 deletions

View File

@ -97,6 +97,8 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Setting debug flags")
if (WITH_ASAN)
message(STATUS "Enabling ASan")
target_link_libraries(Hyprland asan)
add_compile_options(-fsanitize=address)
endif()