Skip to content

Commit

Permalink
Merge pull request #1342 from LuxoftAKutsan/fix/arch_detecting_on_ras…
Browse files Browse the repository at this point in the history
…berry

Fix detecting architecture on raspberry pi
  • Loading branch information
jacobkeeler authored Mar 8, 2017
2 parents 004f598 + ce61434 commit 7c96aee
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions tools/cmake/helpers/platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,16 @@ function(get_os OS)
endfunction()

function(get_arch ARCH)
if(ARCH_X86)
if( CMAKE_SIZEOF_VOID_P MATCHES 8 )
# void ptr = 8 byte --> x86_64
set(${ARCH} "x64" PARENT_SCOPE)
elseif( CMAKE_SIZEOF_VOID_P MATCHES 4 )
# void ptr = 4 byte --> x86
set(${ARCH} "x86" PARENT_SCOPE)
elseif(ARCH_X64)
set(${ARCH} "x64" PARENT_SCOPE)
else()
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386")
set(${ARCH} "x86" PARENT_SCOPE)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
set(${ARCH} "x64" PARENT_SCOPE)
else()
message(FATAL_ERROR "Unsupported architecture")
endif()
endif()
endfunction()
endif()
endfunction(get_arch ARCH)

function(get_sdk SDK)
if(SDK_QT)
Expand Down

0 comments on commit 7c96aee

Please sign in to comment.