From 8450c13fb1c28a1d95f8eb6cf6812e510b6b7961 Mon Sep 17 00:00:00 2001 From: Sacha Date: Thu, 6 Sep 2018 11:05:31 +1000 Subject: [PATCH] Introduce TARGET fallbacks in CMake X86(-64) targets for cross-compilation are likely to be for a simulator/testing and not a production environment. Regardless, we do not know information about the target yet, so choose a default of core2/penryn. --- cmake/system.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/system.cmake b/cmake/system.cmake index 18b2c3b87a..95bb60d380 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -13,6 +13,10 @@ if(CMAKE_CROSSCOMPILING AND NOT DEFINED TARGET) set(TARGET "ARMV8") elseif(ARM) set(TARGET "ARMV7") # TODO: Ask compiler which arch this is + elseif(X86_64) + set(TARGET "PENRYN") + elseif(X86) + set(TARGET "CORE2") else() message(FATAL_ERROR "When cross compiling, a TARGET is required.") endif()