cmake: toolchain: print what we find

Print the name of the discovered toolchain as well as the variable
used to initialize it.

This is nice to know when doing remote support, since users will
sometimes misconfigure their toolchain and not know what that means.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-03-05 14:20:59 -08:00 committed by Johan Hedberg
commit c5f8e9a84b
8 changed files with 15 additions and 0 deletions

View file

@ -27,3 +27,5 @@ assert(CROSS_COMPILE "CROSS_COMPILE is not set")
set(COMPILER gcc)
set(LINKER ld)
set(BINTOOLS gnu)
message(STATUS "Found toolchain: cross-compile (${CROSS_COMPILE})")

View file

@ -18,3 +18,4 @@ set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
message(STATUS "Found toolchain: espressif (${ESPRESSIF_TOOLCHAIN_PATH})")

View file

@ -28,3 +28,5 @@ set(SYSROOT_TARGET arm-none-eabi)
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-)
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
message(STATUS "Found toolchain: gnuarmemb (${GNUARMEMB_TOOLCHAIN_PATH})")

View file

@ -5,3 +5,5 @@ set(LINKER ld)
set(BINTOOLS host-gnu)
set(TOOLCHAIN_HAS_NEWLIB OFF CACHE BOOL "True if toolchain supports newlib")
message(STATUS "Found toolchain: host (gcc/ld)")

View file

@ -30,3 +30,5 @@ set(CMAKE_CXX_COMPILER_TARGET ${triple})
if("${ARCH}" STREQUAL "posix")
set(TOOLCHAIN_HAS_NEWLIB OFF CACHE BOOL "True if toolchain supports newlib")
endif()
message(STATUS "Found toolchain: host (clang/ld)")

View file

@ -40,3 +40,5 @@ set(NOSYSDEF_CFLAG "")
list(APPEND TOOLCHAIN_C_FLAGS -fms-extensions)
set(TOOLCHAIN_HAS_NEWLIB OFF CACHE BOOL "True if toolchain supports newlib")
message(STATUS "Found toolchain: xcc (${XTENSA_TOOLCHAIN_PATH})")

View file

@ -36,3 +36,5 @@ set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
unset(some_toolchain_root)
unset(some_toolchain)
message(STATUS "Found toolchain: xtools (${XTOOLS_TOOLCHAIN_PATH})")

View file

@ -7,3 +7,5 @@ endif()
include(${CMAKE_CURRENT_LIST_DIR}/${SDK_MAJOR_MINOR}/generic.cmake)
set(TOOLCHAIN_KCONFIG_DIR ${CMAKE_CURRENT_LIST_DIR}/${SDK_MAJOR_MINOR})
message(STATUS "Found toolchain: zephyr (${ZEPHYR_SDK_INSTALL_DIR})")