mirror of https://github.com/ARMmbed/mbed-os.git
CMake: Fix error that prevented re-build
Promote MBED_TOOLCHAIN_FILE_USED to cache variable so its previous state can be recalled when re-building. This is because CMAKE_TOOLCHAIN_FILE is also a cache variable and its value is set on first run when it has not been set.pull/13895/head
parent
6068428209
commit
a70edcda0a
|
@ -9,11 +9,9 @@ endif()
|
|||
|
||||
include(${MBED_CONFIG_PATH}/mbed_config.cmake)
|
||||
|
||||
set(MBED_TOOLCHAIN_FILE_USED FALSE)
|
||||
|
||||
# Set default toolchain file
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE)
|
||||
set(MBED_TOOLCHAIN_FILE_USED TRUE)
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE OR MBED_TOOLCHAIN_FILE_USED)
|
||||
set(MBED_TOOLCHAIN_FILE_USED TRUE CACHE INTERNAL "")
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE "${MBED_PATH}/tools/cmake/toolchain.cmake" CACHE INTERNAL "")
|
||||
|
||||
|
|
Loading…
Reference in New Issue