diff options
author | Raymond Ngun <raymond.ngun@cypress.com> | 2020-06-25 09:47:36 -0700 |
---|---|---|
committer | Raymond Ngun <rngu@cypress.com> | 2020-06-30 06:14:04 +0000 |
commit | e3593c6c91fd59bf81a2b6f0c48aff86f2cb3668 (patch) | |
tree | 356e28ebf4342ca58f9d95b42db3eb3885c5519b | |
parent | ddc91961b88372e47aa521ef7d9e588a06941ec9 (diff) | |
download | trusted-firmware-m-e3593c6c91fd59bf81a2b6f0c48aff86f2cb3668.tar.gz |
Build: Find MCUBOOT_REPO only if BL2 is enabled
If BL2 is disabled, there is no purpose in checking MCUBoot
path.
Change-Id: I62536c84b7744e933584f071aa30a6e6d59e9ca2
Signed-off-by: Raymond Ngun <raymond.ngun@cypress.com>
-rw-r--r-- | bl2/ext/mcuboot/CMakeLists.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bl2/ext/mcuboot/CMakeLists.txt b/bl2/ext/mcuboot/CMakeLists.txt index 99070f6e69..ababed199c 100644 --- a/bl2/ext/mcuboot/CMakeLists.txt +++ b/bl2/ext/mcuboot/CMakeLists.txt @@ -21,6 +21,14 @@ embedded_project_start(CONFIG "${TFM_ROOT_DIR}/configs/ConfigDefault.cmake") project(mcuboot LANGUAGES ASM C) embedded_project_fixup() +#Check input variables +if (NOT DEFINED BL2) + message(FATAL ERROR "Incomplete build configuration: BL2 is undefined.") +elseif(NOT BL2) + #If mcuboot is not need to be built then stop further processing. + return() +endif() + #Set the appropriate MCUBoot path if (MCUBOOT_REPO STREQUAL "TF-M") get_filename_component(MCUBOOT_DIR ${CMAKE_CURRENT_LIST_DIR} ABSOLUTE) @@ -31,14 +39,6 @@ else() endif() endif() -#Check input variables -if (NOT DEFINED BL2) - message(FATAL ERROR "Incomplete build configuration: BL2 is undefined.") -elseif(NOT BL2) - #If mcuboot is not need to be built then stop further processing. - return() -endif() - if (NOT DEFINED MBEDCRYPTO_C_FLAGS_BL2) message(FATAL_ERROR "Incomplete build configuration: MBEDCRYPTO_C_FLAGS_BL2 is undefined.") endif() |