mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 22:05:59 +01:00
cmake: make gprof optional for debug builds (#6120)
This fixes the debug build on musl systems, as -pg option is specific to glibc. Now we can build the project on such systems with -DUSE_GPROF=OFF
This commit is contained in:
parent
a66cfe0fbe
commit
f91431465b
1 changed files with 8 additions and 2 deletions
|
@ -126,6 +126,8 @@ endif()
|
|||
add_executable(Hyprland ${SRCFILES} ${TRACY_CPP_FILES})
|
||||
add_dependencies(Hyprland wlroots-hyprland)
|
||||
|
||||
set(USE_GPROF ON)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
message(STATUS "Setting debug flags")
|
||||
|
||||
|
@ -151,8 +153,12 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
add_compile_options(-pg -no-pie -fno-builtin)
|
||||
add_link_options(-pg -no-pie -fno-builtin)
|
||||
add_compile_options(-fno-pie -fno-builtin)
|
||||
add_link_options(-no-pie -fno-builtin)
|
||||
if(USE_GPROF)
|
||||
add_compile_options(-pg)
|
||||
add_link_options(-pg)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_include_file("execinfo.h" EXECINFOH)
|
||||
|
|
Loading…
Reference in a new issue