From f510d07360f68663d558d816fd66500614819beb Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 4 Jan 2023 10:23:11 +0100 Subject: [PATCH] set stdio depending on debug/release --- src/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a62026..16e330d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,8 +43,13 @@ set_target_properties(${CMAKE_PROJECT_NAME} pico_generate_pio_header(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ws2812.pio) -pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1) -pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1) + pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0) +else() + pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 0) + pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 1) +endif() target_link_libraries(${CMAKE_PROJECT_NAME} pico_stdlib