diff options
author | Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no> | 2020-10-30 21:29:40 +0100 |
---|---|---|
committer | Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no> | 2020-12-01 14:31:04 +0100 |
commit | c72d9551307393c7316aa2bf9c5fd74ccf8aa4ef (patch) | |
tree | 6139dbf4236bd4c4e210f7a6db441af3d133fbb7 /lib | |
parent | 0c515de58451a8d333093c4a187d332636d6df14 (diff) | |
download | trusted-firmware-m-c72d9551307393c7316aa2bf9c5fd74ccf8aa4ef.tar.gz |
Boot: Add workaround to not fetch MCUboot's submodules
CMP0097 doesn't work on 3.16 and 3.17.
https://gitlab.kitware.com/cmake/cmake/-/issues/20579
Add a workaround (request the smallest submodule).
This prevents fetching almost 200 MB of data, improving
pristine build times.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Change-Id: Ia46e6de6e43a28bffac0c3904dfbb4fde92df96e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ext/mcuboot/CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/ext/mcuboot/CMakeLists.txt b/lib/ext/mcuboot/CMakeLists.txt index d26d20cdd1..a37b1e4612 100644 --- a/lib/ext/mcuboot/CMakeLists.txt +++ b/lib/ext/mcuboot/CMakeLists.txt @@ -8,9 +8,15 @@ include(FetchContent) set(FETCHCONTENT_QUIET FALSE) -# Set to not download submodules if that option is available -if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0") +# Set to not download submodules if that option is available. +# Because of https://gitlab.kitware.com/cmake/cmake/-/issues/20579 CMP0097 is +# non-functional until cmake 3.18.0. +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.18.0") cmake_policy(SET CMP0097 NEW) + set(MCUBOOT_SUBMODULES "") +else() + # Workaround for not having CMP0097. Fetch the smallest submodule. + set(MCUBOOT_SUBMODULES "boot/cypress/libs/cy-mbedtls-acceleration/") endif() if ("${MCUBOOT_PATH}" STREQUAL "DOWNLOAD") @@ -19,7 +25,7 @@ if ("${MCUBOOT_PATH}" STREQUAL "DOWNLOAD") GIT_TAG ${MCUBOOT_VERSION} GIT_SHALLOW FALSE GIT_PROGRESS TRUE - GIT_SUBMODULES "" + GIT_SUBMODULES ${MCUBOOT_SUBMODULES} ) # ToDo: set GIT_SHALLOW to 'TRUE' when MCUBOOT_VERSION will be set to a tag # (instead of a commit hash) with the new release. |