CMakeLists.txt: Reintroduce CXX_TARGET

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404 2022-08-24 17:33:20 +02:00
parent ab2b666dd3
commit c55dbb25a6
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 1 deletions

View File

@ -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")