cmake: move CMAKE_<lang>_COMPILER_FORCED into toolchain code.
To prepare for more modular approach move the compiler forced out of boilerplate and into the specific toolchain cmake code (generic/target). Code is added to both generic and target toolchain modules to allow future use of one module without requiring a load of the other module. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
254e35d61d
commit
de34b67c45
|
@ -477,10 +477,6 @@ if(NOT DEFINED USER_CACHE_DIR)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Cache files will be written to: ${USER_CACHE_DIR}")
|
message(STATUS "Cache files will be written to: ${USER_CACHE_DIR}")
|
||||||
|
|
||||||
# Prevent CMake from testing the toolchain
|
|
||||||
set(CMAKE_C_COMPILER_FORCED 1)
|
|
||||||
set(CMAKE_CXX_COMPILER_FORCED 1)
|
|
||||||
|
|
||||||
include(${ZEPHYR_BASE}/cmake/verify-toolchain.cmake)
|
include(${ZEPHYR_BASE}/cmake/verify-toolchain.cmake)
|
||||||
include(${ZEPHYR_BASE}/cmake/host-tools.cmake)
|
include(${ZEPHYR_BASE}/cmake/host-tools.cmake)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# Prevent CMake from testing the toolchain
|
||||||
|
set(CMAKE_C_COMPILER_FORCED 1)
|
||||||
|
set(CMAKE_CXX_COMPILER_FORCED 1)
|
||||||
|
|
||||||
if(NOT TOOLCHAIN_ROOT)
|
if(NOT TOOLCHAIN_ROOT)
|
||||||
if(DEFINED ENV{TOOLCHAIN_ROOT})
|
if(DEFINED ENV{TOOLCHAIN_ROOT})
|
||||||
# Support for out-of-tree toolchain
|
# Support for out-of-tree toolchain
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# Prevent CMake from testing the toolchain
|
||||||
|
set(CMAKE_C_COMPILER_FORCED 1)
|
||||||
|
set(CMAKE_CXX_COMPILER_FORCED 1)
|
||||||
|
|
||||||
# No official documentation exists for the "Generic" value, except their wiki.
|
# No official documentation exists for the "Generic" value, except their wiki.
|
||||||
#
|
#
|
||||||
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling:
|
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling:
|
||||||
|
|
Loading…
Reference in a new issue