mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 05:25:58 +01:00
debug: unbreak debug builds
This commit is contained in:
parent
96718d8b09
commit
e8adae65fe
1 changed files with 9 additions and 9 deletions
|
@ -72,6 +72,15 @@ file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
||||||
|
|
||||||
add_executable(Hyprland ${SRCFILES})
|
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)
|
||||||
|
|
||||||
|
add_compile_options(-pg -no-pie -fno-builtin -fsanitize=address)
|
||||||
|
add_link_options(-pg -no-pie -fno-builtin)
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
check_library_exists(execinfo backtrace "" HAVE_LIBEXECINFO)
|
check_library_exists(execinfo backtrace "" HAVE_LIBEXECINFO)
|
||||||
if(HAVE_LIBEXECINFO)
|
if(HAVE_LIBEXECINFO)
|
||||||
|
@ -123,15 +132,6 @@ message(STATUS "Setting link libraries")
|
||||||
|
|
||||||
target_link_libraries(Hyprland PkgConfig::deps)
|
target_link_libraries(Hyprland PkgConfig::deps)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
|
||||||
message(STATUS "Setting debug flags")
|
|
||||||
|
|
||||||
target_link_libraries(Hyprland asan)
|
|
||||||
|
|
||||||
add_compile_options(-pg -no-pie -fno-builtin -fsanitize=address)
|
|
||||||
add_link_options(-pg -no-pie -fno-builtin)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(Hyprland
|
target_link_libraries(Hyprland
|
||||||
${CMAKE_SOURCE_DIR}/subprojects/wlroots/build/libwlroots.so.12032 # wlroots is provided by us
|
${CMAKE_SOURCE_DIR}/subprojects/wlroots/build/libwlroots.so.12032 # wlroots is provided by us
|
||||||
pixman-1
|
pixman-1
|
||||||
|
|
Loading…
Reference in a new issue