From e904e2072311425978b80bc94d00bc1efc0e6a2e Mon Sep 17 00:00:00 2001 From: Jannis Achstetter Date: Sun, 3 Nov 2024 23:35:05 +0100 Subject: [PATCH] Ignore some gcc warnings and print memory usgae percentages after link --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 032c3a6..e056a76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/lib/jsoncpp/interfaceLibForPicoSDK.cmake) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) +## Get rid of some warnings that don't affect use since we build everything +## from source. See https://stackoverflow.com/a/48149400 +add_compile_options(-Wno-psabi) + ## Add our own C/C++ files here ## Sorted alphabetically add_executable(${CMAKE_PROJECT_NAME} @@ -172,6 +176,9 @@ target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR} ) +## Print memory usage percentages after linking +string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--print-memory-usage") + ## Pull in all pico-sdk + non-pico-sdk libraries ## Sorted alphabetically target_link_libraries(${CMAKE_PROJECT_NAME}