mirror of
https://github.com/candle-usb/candleLight_fw.git
synced 2025-01-14 05:42:53 +08:00
27 lines
831 B
CMake
27 lines
831 B
CMake
set(TOOLCHAIN gcc-arm-none-eabi-8-2019-q3-update)
|
|
find_path(
|
|
TOOLCHAIN_BIN_DIR
|
|
arm-none-eabi-gcc
|
|
HINTS
|
|
$ENV{HOME}/bin/${TOOLCHAIN}/bin
|
|
$ENV{HOME}/opt/${TOOLCHAIN}/bin
|
|
/opt/${TOOLCHAIN}/bin
|
|
/srv/${TOOLCHAIN}/bin
|
|
/usr/local/${TOOLCHAIN}/bin
|
|
ENV TOOLCHAIN_BIN_DIR
|
|
)
|
|
|
|
set(CMAKE_SYSTEM_NAME Generic)
|
|
set(CMAKE_SYSTEM_PROCESSOR arm)
|
|
|
|
set(CMAKE_C_COMPILER "${TOOLCHAIN_BIN_DIR}/arm-none-eabi-gcc" CACHE INTERNAL "")
|
|
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_BIN_DIR}/arm-none-eabi-g++" CACHE INTERNAL "")
|
|
set(CMAKE_EXE_LINKER_FLAGS "" CACHE INTERNAL "")
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
|
|
SET (CMAKE_C_COMPILER_WORKS 1)
|
|
SET (CMAKE_CXX_COMPILER_WORKS 1) |