diff options
| author | Ha Thach <[email protected]> | 2023-08-07 11:14:04 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-07 11:14:04 +0700 |
| commit | accc3fd737236dfbebc5ff5cc35369770a88fc60 (patch) | |
| tree | 90048330328f0b8abf6fefeec1ba9e6f74339e76 /hw | |
| parent | 3db945283a694acd9df05df8fbcd13cdd3c819ca (diff) | |
| parent | 2021c6299789a3dd9bd239941d9316494205fe2f (diff) | |
Merge pull request #2151 from kilograham/rp2040_build_fixes
Fix build issues when building for RP2040 from pico-examples/pico-sdk.
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/family_support.cmake | 20 | ||||
| -rw-r--r-- | hw/bsp/rp2040/family.cmake | 2 |
2 files changed, 14 insertions, 8 deletions
diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake index 0375b29aa..7c89427c0 100644 --- a/hw/bsp/family_support.cmake +++ b/hw/bsp/family_support.cmake @@ -1,4 +1,4 @@ -include_guard() +include_guard(GLOBAL) include(CMakePrintHelpers) @@ -36,12 +36,14 @@ if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${FAMILY}/family.cmake) message(FATAL_ERROR "Family '${FAMILY}' is not known/supported") endif() -# enable LTO if supported -include(CheckIPOSupported) -check_ipo_supported(RESULT IPO_SUPPORTED) -if (IPO_SUPPORTED) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) -endif () +if (NOT FAMILY STREQUAL rp2040) + # enable LTO if supported skip rp2040 + include(CheckIPOSupported) + check_ipo_supported(RESULT IPO_SUPPORTED) + if (IPO_SUPPORTED) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) + endif() +endif() set(WARNING_FLAGS_GNU -Wall @@ -288,6 +290,10 @@ function(family_configure_dual_usb_example TARGET RTOS) family_configure_example(${TARGET} ${RTOS}) endfunction() +function(family_example_missing_dependency TARGET DEPENDENCY) + message(WARNING "${DEPENDENCY} submodule needed by ${TARGET} not found, please run 'python tools/get_deps.py ${DEPENDENCY}' to fetch it") +endfunction() + #---------------------------------- # RPI specific: refactor later #---------------------------------- diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake index 465041b12..53e2add56 100644 --- a/hw/bsp/rp2040/family.cmake +++ b/hw/bsp/rp2040/family.cmake @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.13) -include_guard() +include_guard(GLOBAL) if (NOT BOARD) message("BOARD not specified, defaulting to pico_sdk") |
