Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix detecting arhitecture on raspberry pi #1342

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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} "x86" PARENT_SCOPE)
Copy link
Contributor

@jacobkeeler jacobkeeler Mar 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo, should be x64.

elseif( CMAKE_SIZEOF_VOID_P MATCHES 4 )
Copy link
Contributor

@jacobkeeler jacobkeeler Mar 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuxoftAKutsan Do you know whether the change from x64 to x86_64 will break anything? From what I've seen of the CMake changes, it looks like this ARCH value is only really relevant when building for Windows.

# 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