File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,11 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
5151if (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
5252 message (STATUS "Configuring hyprtoolkit in Debug" )
5353 add_compile_definitions (HYPRTOOLKIT_DEBUG)
54+ set (BUILD_TESTING ON )
5455else ()
5556 add_compile_options (-O3)
5657 message (STATUS "Configuring hyprtoolkit in Release" )
58+ set (BUILD_TESTING OFF )
5759endif ()
5860
5961add_compile_definitions (HT_HIDDEN=public )
@@ -134,7 +136,7 @@ protocolnew("staging/linux-drm-syncobj" "linux-drm-syncobj-v1" false)
134136protocolnew("protocols" "wlr-layer-shell-unstable-v1" true )
135137
136138# Tests
137- if (NOT DISABLE_TESTS )
139+ if (BUILD_TESTING )
138140 enable_testing ()
139141
140142 # test apps
@@ -173,6 +175,10 @@ if(NOT DISABLE_TESTS)
173175 OpenGL::OpenGL PkgConfig::deps)
174176
175177 gtest_discover_tests(hyprtoolkit_tests)
178+
179+ # Add coverage to hyprtoolkit
180+ target_compile_options (hyprtoolkit PRIVATE --coverage)
181+ target_link_options (hyprtoolkit PRIVATE --coverage)
176182endif ()
177183
178184# Installation
You can’t perform that action at this time.
0 commit comments