Permalink
Browse files

Fail fast with verbose error when trying to native compile on non-ARM

Signed-off-by: Robin Vobruba <hoijui.quaero@gmail.com>
  • Loading branch information...
hoijui committed Oct 14, 2018
1 parent 7c84151 commit faa5fd770e6a9412c5928b15b572a66592efd3e1
Showing with 9 additions and 0 deletions.
  1. +7 −0 CMakeLists.txt
  2. +2 −0 GNUlinux_config.cmake
@@ -184,6 +184,13 @@ if(ANDROID_PLATFORM AND ANDROID_DEMO)
add_subdirectory(android/NE10Demo/jni)
endif()
# Make sure we are compiling for an ARM system.
# This is a verbose fail-fast in case we are trying to compile for non-ARM;
# otherwise it would fail at `make` with obscure errors.
if(GNULINUX_PLATFORM AND (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^arm"))
message(FATAL_ERROR "You are trying to compile for non-ARM (CMAKE_SYSTEM_PROCESSOR='${CMAKE_SYSTEM_PROCESSOR}')! see doc/building.md for cross compilation instructions.")
endif()
if(IOS_PLATFORM AND IOS_DEMO)
add_subdirectory(ios)
endif()
@@ -36,6 +36,8 @@
# armv7 or aarch64 (Not done yet). Defaut is armv7.
set(GNULINUX_PLATFORM ON)
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "arm")
if(NOT DEFINED ENV{NE10_LINUX_TARGET_ARCH})
set(NE10_LINUX_TARGET_ARCH "armv7")

0 comments on commit faa5fd7

Please sign in to comment.