summaryrefslogtreecommitdiff
path: root/cmake/toolchain.cmake
blob: 8522d7a6a803538ef528c8b722e0fd3187e884c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
set (_CMAKE_TOOLCHAIN_PREFIX "arm-none-eabi-" CACHE STRING "toolchain prefix")
set (_CMAKE_TOOLCHAIN_LOCATION "" CACHE STRING "toolchain location hint")

set (CMAKE_SYSTEM_NAME Generic)
set (CMAKE_C_COMPILER_WORKS 1)
set (CMAKE_CXX_COMPILER_WORKS 1)
set (CMAKE_C_FLAGS "")
set (CMAKE_CXX_FLAGS "")
set (BUILD_SHARED_LIBS OFF)
find_program (CMAKE_C_COMPILER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program (CMAKE_CXX_COMPILER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}g++ HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program (CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program (CMAKE_SIZE NAMES ${_CMAKE_TOOLCHAIN_PREFIX}size HINTS ${_CMAKE_TOOLCHAIN_LOCATION})