CMake: move env to toolchain file (#13369)

Toolchain sets target toolchain related settings that were in env. We do not need env cmake.
See https://cmake.org/cmake/help/v3.8/manual/cmake-toolchains.7.html for details
pull/13566/head
Martin Kojtal 2020-07-29 16:28:24 +01:00 committed by Hugues Kamba
parent 335dfddec1
commit ecfee28517
3 changed files with 9 additions and 12 deletions

View File

@ -11,7 +11,6 @@ include(.mbedbuild/mbed_config.cmake)
include(${MBED_ROOT}/cmake/toolchain.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)
set_target_properties(mbed-os PROPERTIES MBED_TARGET_LABELS "${MBED_TARGET_LABELS}")

View File

@ -1,11 +0,0 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Compiler setup
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_CXX_COMPILER_WORKS TRUE)
# Project setup
enable_language(C CXX ASM)

View File

@ -6,3 +6,12 @@ if(MBEDIDE)
set(MBED_STUDIO_ARM_COMPILER "--ide=mbed")
endif()
include(${MBED_ROOT}/cmake/toolchains/${MBED_TOOLCHAIN}.cmake)
# Compiler setup
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_CXX_COMPILER_WORKS TRUE)
# Project setup
enable_language(C CXX ASM)