Build: Bump CMake mini version to 3.21

CMake 3.15 is a bit out-of-date.
Bump mini version to 3.21 to take advantage of newer version.

Change-Id: I1162aebbfb50507925d6aa86546dcfc41b7aa4de
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8061c92..f767075 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 # CMake 3.21 and above requests projects to specify cpu/arch compile and link flags explicitly in
 # Armclang. Link: https://cmake.org/cmake/help/latest/policy/CMP0123.html
diff --git a/bl2/CMakeLists.txt b/bl2/CMakeLists.txt
index 25908c2..dbd3a3f 100644
--- a/bl2/CMakeLists.txt
+++ b/bl2/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 project("Bootloader" VERSION 0.1.0 LANGUAGES C ASM)
 
diff --git a/bl2/ext/mcuboot/CMakeLists.txt b/bl2/ext/mcuboot/CMakeLists.txt
index ec265fa..80fa9ec 100644
--- a/bl2/ext/mcuboot/CMakeLists.txt
+++ b/bl2/ext/mcuboot/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 add_library(mcuboot_config INTERFACE)
diff --git a/cmake/spe-CMakeLists.cmake b/cmake/spe-CMakeLists.cmake
index a078327..72cb5bf 100644
--- a/cmake/spe-CMakeLists.cmake
+++ b/cmake/spe-CMakeLists.cmake
@@ -4,7 +4,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 # This CMake script is prepard by TF-M for building the non-secure side
 # application and not used in secure build a tree being for export only.
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index eb17631..7b8eef9 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 add_custom_target(docs)
 
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index 3421566..880fef8 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -7,7 +7,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0076 NEW)
 cmake_policy(SET CMP0079 NEW)
 
diff --git a/lib/ext/cryptocell-312-runtime/CMakeLists.txt b/lib/ext/cryptocell-312-runtime/CMakeLists.txt
index 3e61994..69e63f3 100644
--- a/lib/ext/cryptocell-312-runtime/CMakeLists.txt
+++ b/lib/ext/cryptocell-312-runtime/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 project("CC312 Runtime Library" LANGUAGES C ASM)
 
diff --git a/lib/ext/qcbor/CMakeLists.txt b/lib/ext/qcbor/CMakeLists.txt
index 6caa1d2..1288e1d 100644
--- a/lib/ext/qcbor/CMakeLists.txt
+++ b/lib/ext/qcbor/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 include(FetchContent)
 set(FETCHCONTENT_QUIET FALSE)
diff --git a/lib/ext/t_cose/CMakeLists.txt b/lib/ext/t_cose/CMakeLists.txt
index 08a4ca2..ca6179b 100644
--- a/lib/ext/t_cose/CMakeLists.txt
+++ b/lib/ext/t_cose/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 include(${CMAKE_CURRENT_LIST_DIR}/tfm_t_cose.cmake)
 
diff --git a/lib/ext/t_cose/tfm_t_cose.cmake b/lib/ext/t_cose/tfm_t_cose.cmake
index 7da6859..d8f776e 100644
--- a/lib/ext/t_cose/tfm_t_cose.cmake
+++ b/lib/ext/t_cose/tfm_t_cose.cmake
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 ################################ t_cose defs ###################################
 
diff --git a/lib/fih/CMakeLists.txt b/lib/fih/CMakeLists.txt
index 8e5f876..949296e 100644
--- a/lib/fih/CMakeLists.txt
+++ b/lib/fih/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 add_library(tfm_fih_headers INTERFACE)
 add_library(tfm_fih STATIC)
diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt
index 0150d34..3ccb90f 100644
--- a/platform/CMakeLists.txt
+++ b/platform/CMakeLists.txt
@@ -6,7 +6,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0076 NEW)
 cmake_policy(SET CMP0079 NEW)
 
diff --git a/platform/ns/toolchain_ns_ARMCLANG.cmake b/platform/ns/toolchain_ns_ARMCLANG.cmake
index e0e8593..403a781 100644
--- a/platform/ns/toolchain_ns_ARMCLANG.cmake
+++ b/platform/ns/toolchain_ns_ARMCLANG.cmake
@@ -4,7 +4,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 SET(CMAKE_SYSTEM_NAME Generic)
 
diff --git a/secure_fw/CMakeLists.txt b/secure_fw/CMakeLists.txt
index 4a13308..faad902 100644
--- a/secure_fw/CMakeLists.txt
+++ b/secure_fw/CMakeLists.txt
@@ -8,7 +8,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 add_executable(tfm_s)
 add_library(secure_fw INTERFACE)
diff --git a/secure_fw/partitions/CMakeLists.txt b/secure_fw/partitions/CMakeLists.txt
index 47a01c7..c1ebc15 100644
--- a/secure_fw/partitions/CMakeLists.txt
+++ b/secure_fw/partitions/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 add_library(tfm_partitions INTERFACE)
 target_link_libraries(tfm_partitions
diff --git a/secure_fw/partitions/crypto/CMakeLists.txt b/secure_fw/partitions/crypto/CMakeLists.txt
index 7fb1c54..9e6e61e 100644
--- a/secure_fw/partitions/crypto/CMakeLists.txt
+++ b/secure_fw/partitions/crypto/CMakeLists.txt
@@ -11,7 +11,7 @@
 
 find_package(Python3)
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 add_library(tfm_psa_rot_partition_crypto STATIC)
diff --git a/secure_fw/partitions/firmware_update/CMakeLists.txt b/secure_fw/partitions/firmware_update/CMakeLists.txt
index 53c9a6c..f9a2bb5 100644
--- a/secure_fw/partitions/firmware_update/CMakeLists.txt
+++ b/secure_fw/partitions/firmware_update/CMakeLists.txt
@@ -9,7 +9,7 @@
     return()
 endif()
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 add_library(tfm_psa_rot_partition_fwu STATIC)
diff --git a/secure_fw/partitions/firmware_update/bootloader/mcuboot/CMakeLists.txt b/secure_fw/partitions/firmware_update/bootloader/mcuboot/CMakeLists.txt
index 6bc22dc..a1a0853 100644
--- a/secure_fw/partitions/firmware_update/bootloader/mcuboot/CMakeLists.txt
+++ b/secure_fw/partitions/firmware_update/bootloader/mcuboot/CMakeLists.txt
@@ -4,7 +4,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 add_library(tfm_fwu_mcuboot_util INTERFACE)
diff --git a/secure_fw/partitions/idle_partition/CMakeLists.txt b/secure_fw/partitions/idle_partition/CMakeLists.txt
index a6c3526..2d957ed 100644
--- a/secure_fw/partitions/idle_partition/CMakeLists.txt
+++ b/secure_fw/partitions/idle_partition/CMakeLists.txt
@@ -12,7 +12,7 @@
     return()
 endif()
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 target_sources(tfm_spm
diff --git a/secure_fw/partitions/initial_attestation/CMakeLists.txt b/secure_fw/partitions/initial_attestation/CMakeLists.txt
index 0a70ee9..090eddc 100644
--- a/secure_fw/partitions/initial_attestation/CMakeLists.txt
+++ b/secure_fw/partitions/initial_attestation/CMakeLists.txt
@@ -9,7 +9,7 @@
     return()
 endif()
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 configure_file(${CMAKE_SOURCE_DIR}/interface/include/psa/initial_attestation.h.in
diff --git a/secure_fw/partitions/internal_trusted_storage/CMakeLists.txt b/secure_fw/partitions/internal_trusted_storage/CMakeLists.txt
index 94aa822..fa77a33 100644
--- a/secure_fw/partitions/internal_trusted_storage/CMakeLists.txt
+++ b/secure_fw/partitions/internal_trusted_storage/CMakeLists.txt
@@ -9,7 +9,7 @@
     return()
 endif()
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 add_library(tfm_psa_rot_partition_its STATIC)
diff --git a/secure_fw/partitions/lib/runtime/CMakeLists.txt b/secure_fw/partitions/lib/runtime/CMakeLists.txt
index 9472784..91a1800 100644
--- a/secure_fw/partitions/lib/runtime/CMakeLists.txt
+++ b/secure_fw/partitions/lib/runtime/CMakeLists.txt
@@ -7,7 +7,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 add_library(tfm_sprt STATIC)
 
diff --git a/secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt b/secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt
index 3477b74..36d4a57 100644
--- a/secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt
+++ b/secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt
@@ -11,7 +11,7 @@
     return()
 endif()
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 add_library(tfm_psa_rot_partition_ns_agent_mailbox STATIC)
diff --git a/secure_fw/partitions/ns_agent_tz/CMakeLists.txt b/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
index 78557ff..d08e7a3 100644
--- a/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
+++ b/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
@@ -11,7 +11,7 @@
     return()
 endif()
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 target_sources(tfm_partitions
diff --git a/secure_fw/partitions/platform/CMakeLists.txt b/secure_fw/partitions/platform/CMakeLists.txt
index 11cd503..fd170c2 100644
--- a/secure_fw/partitions/platform/CMakeLists.txt
+++ b/secure_fw/partitions/platform/CMakeLists.txt
@@ -9,7 +9,7 @@
     return()
 endif()
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 add_library(tfm_psa_rot_partition_platform STATIC
diff --git a/secure_fw/partitions/protected_storage/CMakeLists.txt b/secure_fw/partitions/protected_storage/CMakeLists.txt
index 422bd6b..12ea65f 100644
--- a/secure_fw/partitions/protected_storage/CMakeLists.txt
+++ b/secure_fw/partitions/protected_storage/CMakeLists.txt
@@ -9,7 +9,7 @@
     return()
 endif()
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 cmake_policy(SET CMP0079 NEW)
 
 add_library(tfm_app_rot_partition_ps STATIC)
diff --git a/secure_fw/spm/CMakeLists.txt b/secure_fw/spm/CMakeLists.txt
index 537d88d..273f28d 100755
--- a/secure_fw/spm/CMakeLists.txt
+++ b/secure_fw/spm/CMakeLists.txt
@@ -8,7 +8,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 if(PSA_FRAMEWORK_HAS_MM_IOVEC)
     message(NOTICE "**** MM-IOVEC is enabled for memory and runtime optimizations for larger buffers, ****\n"
diff --git a/toolchain_ARMCLANG.cmake b/toolchain_ARMCLANG.cmake
index dee167a..3516487 100644
--- a/toolchain_ARMCLANG.cmake
+++ b/toolchain_ARMCLANG.cmake
@@ -6,7 +6,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 #
 #-------------------------------------------------------------------------------
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 
 SET(CMAKE_SYSTEM_NAME Generic)
 
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 8389b85..bf37274 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.21)
 find_package(Python3)
 
 ############################### Manifest lists declaration #####################