Commit ab3f6650 authored by Dan Sojka's avatar Dan Sojka
Browse files

Added addtional architectures


Signed-off-by: Dan Sojka's avatarDan Sojka <dsojka@emacinc.com>
parent 16d85b9e
SET(TC_ARMV5_LOC ${CMAKE_CURRENT_SOURCE_DIR}/../toolchain.armv5e.cmake)
SET(TC_ARMV7_LOC ${CMAKE_CURRENT_SOURCE_DIR}/../toolchain.armv7a.cmake)
SET(TC_i586_LOC ${CMAKE_CURRENT_SOURCE_DIR}/../toolchain.i586.cmake)
SET(TC_core2_LOC ${CMAKE_CURRENT_SOURCE_DIR}/../toolchain.core2.cmake)
if(DEFINED ARCH)
else()
......@@ -18,22 +20,46 @@ MinSizeRel."
FORCE)
endif(NOT CMAKE_BUILD_TYPE)
if(${ARCH} STREQUAL "x86")
if(${ARCH} STREQUAL "i586")
if(EXISTS ${TC_i586_LOC})
SET(CMAKE_TOOLCHAIN_FILE ${TC_i586_LOC})
else()
MESSAGE(FATAL_ERROR "Warning: i586 toolchain is not installed")
endif()
elseif(${ARCH} STREQUAL "core2")
if(EXISTS ${TC_core2_LOC})
SET(CMAKE_TOOLCHAIN_FILE ${TC_core2_LOC})
else()
MESSAGE(FATAL_ERROR "Warning: core2 toolchain is not installed")
endif()
elseif(${ARCH} STREQUAL "armv5")
if(EXISTS ${TC_ARMV5_LOC})
SET(CMAKE_TOOLCHAIN_FILE ${TC_ARMV5_LOC})
else()
MESSAGE(FATAL_ERROR "Warning: armv5 toolchain is not installed")
endif()
elseif(${ARCH} STREQUAL "armv7")
if(EXISTS ${TC_ARMV7_LOC})
SET(CMAKE_TOOLCHAIN_FILE ${TC_ARMV7_LOC})
else()
MESSAGE(FATAL_ERROR "Warning: armv7 toolchain is not installed")
endif()
elseif(${ARCH} STREQUAL "arm")
if(EXISTS ${TC_ARMV5_LOC})
SET(CMAKE_TOOLCHAIN_FILE ${TC_ARMV5_LOC})
else()
MESSAGE(FATAL_ERROR "Warning: armv5 toolchain is not installed")
endif()
elseif(${ARCH} STREQUAL "x86")
if(EXISTS ${TC_i586_LOC})
SET(CMAKE_TOOLCHAIN_FILE ${TC_i586_LOC})
else()
MESSAGE(FATAL_ERROR "Warning: i586 toolchain is not installed")
endif()
elseif(${ARCH} STREQUAL "def")
MESSAGE(STATUS "Using system compiler")
else()
MESSAGE(FATAL_ERROR "ERROR: Not a valid toolchain name. Options are: arm and x86")
MESSAGE(FATAL_ERROR "ERROR: Not a valid toolchain name. Options are: i586, core2, armv5, and armv7")
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment