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 <devaraj.ranganna@arm.com>
pull/13566/head
Devaraj Ranganna 2020-07-23 11:33:45 +01:00 committed by Hugues Kamba
parent 6b5ef8a9a7
commit 915d552cde
1 changed files with 2 additions and 2 deletions

View File

@ -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)