cmake: By default only apply patches when downloading remote libraries

By default only apply the required patches to remote libraries when they
are using the DOWNLOAD strategy.
When remote library locations are provided manually the patches
should be manually managed.
Add option to force applying patches always.

Change-Id: I7c121a70851d8545bc7e61e0022b2692157fb3ef
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
diff --git a/config/config_base.cmake b/config/config_base.cmake
index b6c7608..accde88 100755
--- a/config/config_base.cmake
+++ b/config/config_base.cmake
@@ -122,6 +122,7 @@
 ################################## Dependencies ################################
 
 set(MBEDCRYPTO_PATH                     "DOWNLOAD"  CACHE PATH      "Path to Mbed Crypto (or DOWNLOAD to fetch automatically")
+set(MBEDCRYPTO_FORCE_PATCH              OFF         CACHE BOOL      "Always apply MBed Crypto patches")
 set(MBEDCRYPTO_VERSION                  "mbedtls-3.2.1" CACHE STRING "The version of Mbed Crypto to use")
 set(MBEDCRYPTO_GIT_REMOTE               "https://github.com/Mbed-TLS/mbedtls.git" CACHE STRING "The URL (or path) to retrieve MbedTLS from.")
 set(MBEDCRYPTO_BUILD_TYPE               "${CMAKE_BUILD_TYPE}" CACHE STRING "Build type of Mbed Crypto library")
@@ -140,6 +141,7 @@
 
 set(PSA_ARCH_TESTS_PATH                 "DOWNLOAD"  CACHE PATH      "Path to PSA arch tests (or DOWNLOAD to fetch automatically")
 set(PSA_ARCH_TESTS_VERSION              "cf8bd71"   CACHE STRING    "The version of PSA arch tests to use")
+set(PSA_ARCH_TESTS_FORCE_PATCH          OFF         CACHE BOOL      "Always apply PSA arch tests patches")
 
 set(NS_EVALUATION_APP_PATH              ""          CACHE PATH      "Path to TFM NS Evaluation Application")