Skip to content

Commit

Permalink
Merge pull request #103 from kripton/CMakeQOL
Browse files Browse the repository at this point in the history
Ignore some gcc warnings and print memory usgae percentages after link
  • Loading branch information
kripton authored Nov 3, 2024
2 parents 8c3cf40 + e904e20 commit 8d973f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 8d973f4

Please sign in to comment.