Build: Move out some codes from set_config.cmake
CMake config and Kconfig system will be separated later.
Moving out some common codes from set_config.cmake
- Add pre_config.cmake for common codes
- Move out platform preload.cmake to pre_config.cmake
- Move out Library Model deprecation message to pre_config.cmake
- Move out CMAKE_BUILD_TYPE setup to pre_config.cmake
- Error checks (Library Model, TFM_SYSTEM_DSP and CMAKE_GENERATOR) are
gathered together into pre_config.cmake
- Add post_config.cmake for common codes
- Move out the tfm_config setup from set_config.cmake to
post_config.cmake.
- Move out tfm_build_log_config.cmake inclusion to post_config.cmake
- Move test repo fetch and config are separated and move to
post_config.cmake
Change-Id: Idf39766d4f7c3e3933443c7eef31b9e0479064ea
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 64f70e8..0badba6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
# Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company)
# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
#
@@ -23,20 +23,9 @@
include(remote_library)
############################ CONFIGURATION #####################################
-
-# Configure TFM_PLATFORM
-include(${CMAKE_SOURCE_DIR}/config/tfm_platform.cmake)
-
-if(TFM_SYSTEM_DSP)
- message(FATAL_ERROR "Hardware DSP is currently not supported in TF-M")
-endif()
-
+include(config/pre_config.cmake)
include(config/set_config.cmake)
-
-if(NOT ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" AND
- NOT ${CMAKE_GENERATOR} STREQUAL "Ninja")
- Message(FATAL_ERROR "Unsupported generator ${CMAKE_GENERATOR}. Hint: Try -G\"Unix Makefiles\"")
-endif()
+include(config/post_config.cmake)
############################### Compiler configuration #########################