aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRaef Coles <raef.coles@arm.com>2020-10-08 12:12:58 +0100
committerSoby Mathew <soby.mathew@arm.com>2020-11-03 10:26:38 +0000
commit958aeef5c0818c591c043a22defa8882731c9907 (patch)
treec5a7b7ab713eeaee823bfea249601afbe66d5aed /CMakeLists.txt
parent698173275839bbe1f724e3f8c580578fdf3371d3 (diff)
downloadtrusted-firmware-m-958aeef5c0818c591c043a22defa8882731c9907.tar.gz
Build: Add configuration checking
Also split configuration step into a separate file. Change-Id: Iab70f4b7a7e2e3bcc19a1399523c9a4d4d5dc7f5 Signed-off-by: Raef Coles <raef.coles@arm.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt42
1 files changed, 1 insertions, 41 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5368f8eb7..71a24974d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,47 +11,7 @@ set(TFM_VERSION 1.1.0)
############################ CONFIGURATION #####################################
-# First load defaults.
-include(config/config_default.cmake)
-
-# Then load the build type config, overriding defaults and command line.
-string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE)
-if (EXISTS ${CMAKE_SOURCE_DIR}/config/build_type/${CMAKE_BUILD_TYPE_LOWERCASE}.cmake)
- include(${CMAKE_SOURCE_DIR}/config/build_type/${CMAKE_BUILD_TYPE_LOWERCASE}.cmake)
-endif()
-
-# If configured for tests, load config specific to tests overriding defaults.
-if (TEST_PSA_API)
- include(config/tests/config_test_psa_api.cmake)
-endif()
-
-# Then load the profile, overriding build type config, defaults and command
-# line.
-if (TFM_PROFILE)
- include(config/profile/${TFM_PROFILE}.cmake)
-endif()
-
-# Then load the platform options, overriding profile, build type config,
-# defaults and command line.
-if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/config.cmake)
- include(platform/ext/target/${TFM_PLATFORM}/config.cmake)
-endif()
-
-# If CRYPTO_HW_ACCELERATOR is enabled by the platform, then load the
-# corresponding config if it exists
-if (CRYPTO_HW_ACCELERATOR)
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/platform/ext/accelerator/${CRYPTO_HW_ACCELERATOR_TYPE}/config.cmake)
- include(platform/ext/accelerator/${CRYPTO_HW_ACCELERATOR_TYPE}/config.cmake)
- endif()
-endif()
-
-# Optionally load extra config, overriding platform options, overriding profile,
-# build type config, defaults and command line.
-if (TFM_EXTRA_CONFIG_PATH)
- include(${TFM_EXTRA_CONFIG_PATH})
-endif()
-
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+include(config/set_config.cmake)
if(NOT ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" AND
NOT ${CMAKE_GENERATOR} STREQUAL "Ninja")