Fix arm linux toolchain file

Use find_program() to set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.

Originally the variables was set to compiler name, without absolute path.
CMake 3.0 tries to find them in CMAKE_FIND_ROOT_PATH (since 
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM was set to ONLY) and fails.
pull/3624/head
Vladislav Vinogradov 10 years ago
parent df57d038b8
commit 5978ef1df5
  1. 5
      platforms/linux/arm-gnueabi.toolchain.cmake

@ -5,13 +5,12 @@ set(CMAKE_SYSTEM_PROCESSOR arm)
set(GCC_COMPILER_VERSION "4.6" CACHE STRING "GCC Compiler version")
set(FLOAT_ABI_SUFFIX "")
if (NOT SOFTFP)
set(FLOAT_ABI_SUFFIX "hf")
endif()
set(CMAKE_C_COMPILER arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-gcc-${GCC_COMPILER_VERSION})
set(CMAKE_CXX_COMPILER arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-g++-${GCC_COMPILER_VERSION})
find_program(CMAKE_C_COMPILER NAMES arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-gcc-${GCC_COMPILER_VERSION})
find_program(CMAKE_CXX_COMPILER NAMES arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-g++-${GCC_COMPILER_VERSION})
set(ARM_LINUX_SYSROOT /usr/arm-linux-gnueabi${FLOAT_ABI_SUFFIX} CACHE PATH "ARM cross compilation system root")
set(CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags")

Loading…
Cancel
Save