From c55dbb25a6a088fb68e356b424dd26847b04b64b Mon Sep 17 00:00:00 2001 From: Username404 Date: Wed, 24 Aug 2022 17:33:20 +0200 Subject: [PATCH] CMakeLists.txt: Reintroduce CXX_TARGET Signed-off-by: Username404 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8782fbf..951d5ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,9 @@ if (CMAKE_CXX_LINK_PIE_SUPPORTED) elseif(USER_DEFINED_PIE AND CMAKE_POSITION_INDEPENDENT_CODE) message(NOTICE "-- Could NOT manually enable Position-Independent Code (PIC) because it is not supported by the current toolchain") endif() -if (CMAKE_SYSTEM_PROCESSOR STREQUAL "") +if (DEFINED CXX_TARGET) + set(CMAKE_SYSTEM_PROCESSOR "${CXX_TARGET}") +elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "") set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}") endif() set(CMAKE_CXX_FLAGS "-Wall")