Skip to content

Commit 1a16ace

Browse files
rugeGerritsennashif
authored andcommitted
unittest: Enable debug info by default
By enabling debugging information it becomes way much simpler to find the root cause of a failing unit test as we can simply run it with a debugger. Signed-off-by: Rubin Gerritsen <[email protected]>
1 parent 35c0cc7 commit 1a16ace

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmake/modules/unittest.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ target_link_libraries(testbinary PRIVATE
121121
${EXTRA_LDFLAGS_AS_LIST}
122122
)
123123

124+
target_compile_options(test_interface INTERFACE $<TARGET_PROPERTY:compiler,debug>)
125+
124126
if(CONFIG_COVERAGE)
125127
target_compile_options(test_interface INTERFACE $<TARGET_PROPERTY:compiler,coverage>)
126128

0 commit comments

Comments
 (0)