#set(CMAKE_SYSTEM_NAME Generic)
#
#set(TOOLCHAIN arm-none-eabi)
#set(CMAKE_FIND_ROOT_PATH "$ENV{HOME}/toolchain")
#set(TOOLCHAIN_BIN_DIR "${CMAKE_FIND_ROOT_PATH}/bin")
#set(CMAKE_C_COMPILER "${TOOLCHAIN_BIN_DIR}/${TOOLCHAIN}-gcc")
#set(CMAKE_CXX_COMPILER "${TOOLCHAIN_BIN_DIR}/${TOOLCHAIN}-g++")
#
#set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
#set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
include(CMakeForceCompiler)

set(CMAKE_SYSTEM_NAME Generic)

set(TOOLCHAIN arm-none-eabi)
set(TOOLCHAIN_DIR "$ENV{HOME}/toolchain")
#set(TOOLCHAIN_DIR "$ENV{HOME}/tools/gcc-arm-none-eabi-4_7-2013q1")
set(TOOLCHAIN_BIN_DIR "${TOOLCHAIN_DIR}/bin")
CMAKE_FORCE_C_COMPILER("${TOOLCHAIN_BIN_DIR}/${TOOLCHAIN}-gcc" GNU)
CMAKE_FORCE_CXX_COMPILER("${TOOLCHAIN_BIN_DIR}/${TOOLCHAIN}-g++" GNU)

set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_DIR})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
