CMake: Move APPLE host check into x86 branch

This is to more clearly record the OSX host + x86 target assumption
when setting CROSS_COMPILER_PREFIX to "x86_64-unknown-linux-gnu-"
This commit is contained in:
Kent McLeod
2018-09-10 13:50:22 +10:00
parent a5a1efeaf5
commit 5ee9dec227

View File

@@ -34,8 +34,12 @@ if("${CROSS_COMPILER_PREFIX}" STREQUAL "")
set(CROSS_COMPILER_PREFIX "riscv32-unknown-elf-" CACHE INTERNAL "")
elseif(RISCV64)
set(CROSS_COMPILER_PREFIX "riscv64-unknown-elf-" CACHE INTERNAL "")
elseif(APPLE)
set(CROSS_COMPILER_PREFIX "x86_64-unknown-linux-gnu-" CACHE INTERNAL "")
else()
# If we haven't set a target above we assume x86_64/ia32 target
if(APPLE)
# APPLE is a CMake variable that evaluates to True on a Mac OSX system
set(CROSS_COMPILER_PREFIX "x86_64-unknown-linux-gnu-" CACHE INTERNAL "")
endif()
endif()
endif()