aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-12-12 14:38:50 +0000
committervaxerski <[email protected]>2022-12-12 14:38:50 +0000
commitb45a2134135d6d6269ba374372c93361c799d6b8 (patch)
tree3a4c7be1db3dabdaad3280ea08f3f16cdd65869d /CMakeLists.txt
parent1a9ee959dd2ebdf0c9db14bfeae4fe66188d54a8 (diff)
downloadHyprland-b45a2134135d6d6269ba374372c93361c799d6b8.tar.gz
Hyprland-b45a2134135d6d6269ba374372c93361c799d6b8.zip
always build with ASan in debug
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 11 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5ee63c5..91d2647b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,9 +89,18 @@ message(STATUS "Setting link libraries")
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)
+
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -no-pie -fno-builtin -fsanitize=address")
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -no-pie -fno-builtin")
+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg -no-pie -fno-builtin")
+ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
+
target_link_libraries(Hyprland
- asan
- ${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
OpenGL
GLESv2
@@ -100,11 +109,3 @@ target_link_libraries(Hyprland
${CMAKE_SOURCE_DIR}/ext-workspace-unstable-v1-protocol.o
${CMAKE_SOURCE_DIR}/hyprland-toplevel-export-v1-protocol.o
)
-
-IF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
- message(STATUS "Setting debug flags")
-
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -no-pie -fno-builtin -fsanitize=address")
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -no-pie -fno-builtin")
- SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg -no-pie -fno-builtin")
-ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)