diff options
author | TheCharlatan <seb.kung@gmail.com> | 2019-02-22 15:18:32 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-05 10:24:14 +0000 |
commit | 5057eb1199a9f1e4be4f0f9e0fe7cea5eea6027c (patch) | |
tree | 3b679a8e5670b15c99be85872d63f0ba7099a78c /CMakeLists.txt | |
parent | Merge pull request #5101 (diff) | |
download | monero-5057eb1199a9f1e4be4f0f9e0fe7cea5eea6027c.tar.xz |
cmake: ARCH_ID fixes for cross compilation
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 90b16cab8..191cc8966 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,9 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) # to identify the target architecture, to direct logic in this cmake script. # Since ARCH is a cached variable, it will not be set on first cmake invocation. if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "default") + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "") + set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}) + endif() set(ARCH_ID "${CMAKE_SYSTEM_PROCESSOR}") else() set(ARCH_ID "${ARCH}") |