From 915d552cde5fa6487a3e743cb22c3ed8b9fa483c Mon Sep 17 00:00:00 2001 From: Devaraj Ranganna Date: Thu, 23 Jul 2020 11:33:45 +0100 Subject: [PATCH] cmake: Re-order cmake script inclusions The script `cmake/env.cmake` enables languages and in the case of Arm compiler, `CMAKE_SYSTEM_PROCESSOR` is expected to be set before a language is enabled. `CMAKE_SYSTEM_PROCESSOR` is set in `cmake/core.cmake`. Therefore, `cmake/core.cmake` is included before `cmake/env.cmake`. Similarly, `cmake/profile.cmake` sets compiler options, hence it is included before enabling languages in `cmake/env.cmake`. Signed-off-by: Devaraj Ranganna --- cmake/app.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/app.cmake b/cmake/app.cmake index 15afa2d645..73c983e574 100644 --- a/cmake/app.cmake +++ b/cmake/app.cmake @@ -2,10 +2,10 @@ include(.mbedbuild/mbed_config.cmake) include(${MBED_ROOT}/cmake/toolchain.cmake) -include(${MBED_ROOT}/cmake/env.cmake) -include(${MBED_ROOT}/cmake/util.cmake) include(${MBED_ROOT}/cmake/core.cmake) include(${MBED_ROOT}/cmake/profile.cmake) +include(${MBED_ROOT}/cmake/env.cmake) +include(${MBED_ROOT}/cmake/util.cmake) # if the environment does not specify build type, set to Debug if(NOT CMAKE_BUILD_TYPE)