Skip to content

Commit f890a6c

Browse files
authored
Merge pull request #1401 from NickeZ/nickez/add-asf4-debug-definition
asf4: Enable DEBUG and USE_SIMPLE_ASSERT in debug builds
2 parents 09f8877 + 46b137a commit f890a6c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

external/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ if(CMAKE_CROSSCOMPILING)
133133

134134
target_compile_options(asf4-drivers-min PRIVATE -Wno-cast-qual -Wno-unused-parameter -Wno-missing-prototypes -Wno-missing-declarations -Wno-bad-function-cast -Wno-strict-prototypes -Wno-old-style-definition)
135135

136+
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
137+
target_compile_definitions(asf4-drivers-min PUBLIC DEBUG USE_SIMPLE_ASSERT)
138+
endif()
139+
136140
target_link_libraries(asf4-drivers-min samd51a-ds)
137141
set_property(TARGET asf4-drivers-min PROPERTY INTERFACE_LINK_LIBRARIES "")
138142

0 commit comments

Comments
 (0)