Skip to content

CMake: Rename Mbed OS path variable for consistency #13866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ if(POLICY CMP0076)
cmake_policy(SET CMP0076 NEW)
endif()

include(${MBED_ROOT}/tools/cmake/core.cmake)
include(${MBED_ROOT}/tools/cmake/profile.cmake)
include(${MBED_PATH}/tools/cmake/core.cmake)
include(${MBED_PATH}/tools/cmake/profile.cmake)

add_library(mbed-core INTERFACE)

Expand Down Expand Up @@ -185,7 +185,7 @@ function(mbed_generate_map_file target)
TARGET
${target}
POST_BUILD
COMMAND ${Python3_EXECUTABLE} ${MBED_ROOT}/tools/memap.py -t ${MBED_TOOLCHAIN} -d 4 ${CMAKE_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map
COMMAND ${Python3_EXECUTABLE} ${MBED_PATH}/tools/memap.py -t ${MBED_TOOLCHAIN} -d 4 ${CMAKE_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map
WORKING_DIRECTORY
${CMAKE_BINARY_DIR}
COMMENT
Expand Down
2 changes: 1 addition & 1 deletion docs/design-documents/tools/cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The next sections will describe static CMake files within Mbed OS Core repositor

The `CMakeLists.txt` entry point in the root of the Mbed OS repository contains the top level build specification for Mbed OS. This file also includes the auto generated `mbed_config.cmake` script, which is created by `mbed-tools`.

This is not intended to be included by an application. Applications must use `add_subdirectory(${MBED_ROOT})`.
This is not intended to be included by an application. Applications must use `add_subdirectory(${MBED_PATH})`.

### 2. Toolchain CMake Scripts

Expand Down
4 changes: 2 additions & 2 deletions tools/cmake/app.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ 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 "")
set(CMAKE_TOOLCHAIN_FILE "${MBED_PATH}/tools/cmake/toolchain.cmake" CACHE INTERNAL "")
endif()

# Toolchain setup
include(${MBED_ROOT}/tools/cmake/toolchains/${MBED_TOOLCHAIN}.cmake)
include(${MBED_PATH}/tools/cmake/toolchains/${MBED_TOOLCHAIN}.cmake)
enable_language(C CXX ASM)
2 changes: 1 addition & 1 deletion tools/cmake/core.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

include(${MBED_ROOT}/tools/cmake/cores/${MBED_CPU_CORE}.cmake)
include(${MBED_PATH}/tools/cmake/cores/${MBED_CPU_CORE}.cmake)
2 changes: 1 addition & 1 deletion tools/cmake/profile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ else()
endif()
endif()

include(${MBED_ROOT}/tools/cmake/profiles/${LOWERCASE_CMAKE_BUILD_TYPE}.cmake)
include(${MBED_PATH}/tools/cmake/profiles/${LOWERCASE_CMAKE_BUILD_TYPE}.cmake)