mirror of https://github.com/ARMmbed/mbed-os.git
CMake: fix application config
These settings like enable_language should be done in the application and just once. We hit the issue when you expose sources to an app (interface or public), CMake errors as some of the internal settings have not been configured.pull/13566/head
parent
e0eee75eaf
commit
c9cacaf080
|
@ -10,17 +10,6 @@ if(POLICY CMP0076)
|
|||
cmake_policy(SET CMP0076 NEW)
|
||||
endif()
|
||||
|
||||
include(${MBED_CONFIG_PATH}/mbed_config.cmake)
|
||||
|
||||
# Set default toolchain file
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE)
|
||||
set(CMAKE_TOOLCHAIN_FILE "${MBED_ROOT}/tools/cmake/toolchain.cmake" CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
# Toolchain setup
|
||||
include(${MBED_ROOT}/tools/cmake/toolchains/${MBED_TOOLCHAIN}.cmake)
|
||||
enable_language(C CXX ASM)
|
||||
|
||||
include(${MBED_ROOT}/tools/cmake/core.cmake)
|
||||
include(${MBED_ROOT}/tools/cmake/profile.cmake)
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(${MBED_CONFIG_PATH}/mbed_config.cmake)
|
||||
|
||||
# Set default toolchain file
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE)
|
||||
set(CMAKE_TOOLCHAIN_FILE "${MBED_ROOT}/tools/cmake/toolchain.cmake" CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
# Toolchain setup
|
||||
include(${MBED_ROOT}/tools/cmake/toolchains/${MBED_TOOLCHAIN}.cmake)
|
||||
enable_language(C CXX ASM)
|
Loading…
Reference in New Issue