aboutsummaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorRaymond Ngun <raymond.ngun@cypress.com>2020-06-25 09:47:36 -0700
committerRaymond Ngun <rngu@cypress.com>2020-06-30 06:14:04 +0000
commite3593c6c91fd59bf81a2b6f0c48aff86f2cb3668 (patch)
tree356e28ebf4342ca58f9d95b42db3eb3885c5519b /bl2
parentddc91961b88372e47aa521ef7d9e588a06941ec9 (diff)
downloadtrusted-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>
Diffstat (limited to 'bl2')
-rw-r--r--bl2/ext/mcuboot/CMakeLists.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/bl2/ext/mcuboot/CMakeLists.txt b/bl2/ext/mcuboot/CMakeLists.txt
index 99070f6e6..ababed199 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()