Skip to content

Commit 8d973f4

Browse files
authored
Merge pull request #103 from kripton/CMakeQOL
Ignore some gcc warnings and print memory usgae percentages after link
2 parents 8c3cf40 + e904e20 commit 8d973f4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/lib/jsoncpp/interfaceLibForPicoSDK.cmake)
8383
set(CMAKE_CXX_STANDARD 20)
8484
set(CMAKE_CXX_STANDARD_REQUIRED ON)
8585

86+
## Get rid of some warnings that don't affect use since we build everything
87+
## from source. See https://stackoverflow.com/a/48149400
88+
add_compile_options(-Wno-psabi)
89+
8690
## Add our own C/C++ files here
8791
## Sorted alphabetically
8892
add_executable(${CMAKE_PROJECT_NAME}
@@ -172,6 +176,9 @@ target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
172176
${CMAKE_CURRENT_LIST_DIR}
173177
)
174178

179+
## Print memory usage percentages after linking
180+
string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--print-memory-usage")
181+
175182
## Pull in all pico-sdk + non-pico-sdk libraries
176183
## Sorted alphabetically
177184
target_link_libraries(${CMAKE_PROJECT_NAME}

0 commit comments

Comments
 (0)