mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-11 13:23:14 +00:00
volk_gnsssdr: improve 64 bit host CPU detection
This commit is contained in:
parent
1120c53252
commit
dca58720f9
@ -272,18 +272,33 @@ endif()
|
||||
########################################################################
|
||||
if(NOT CROSSCOMPILE_MULTILIB AND CPU_IS_x86)
|
||||
include(CheckTypeSize)
|
||||
check_type_size("void*[8]" SIZEOF_CPU BUILTIN_TYPES_ONLY)
|
||||
if(${SIZEOF_CPU} EQUAL 64)
|
||||
overrule_arch(32 "CPU width is 64 bits")
|
||||
endif()
|
||||
if(${SIZEOF_CPU} EQUAL 32)
|
||||
overrule_arch(64 "CPU width is 32 bits")
|
||||
if(CMAKE_VERSION VERSION_LESS 3.10)
|
||||
check_type_size("void*[8]" SIZEOF_CPU BUILTIN_TYPES_ONLY)
|
||||
if(${SIZEOF_CPU} EQUAL 64)
|
||||
overrule_arch(32 "CPU width is 64 bits")
|
||||
endif()
|
||||
if(${SIZEOF_CPU} EQUAL 32)
|
||||
overrule_arch(64 "CPU width is 32 bits")
|
||||
endif()
|
||||
else()
|
||||
cmake_host_system_information(RESULT ASSUME_64BIT_HOST QUERY IS_64BIT)
|
||||
if(ASSUME_64BIT_HOST)
|
||||
overrule_arch(32 "CPU width is 64 bits")
|
||||
else()
|
||||
overrule_arch(64 "CPU width is 32 bits")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# MSVC 64 bit does not have MMX, overrule it
|
||||
if(MSVC)
|
||||
if(${SIZEOF_CPU} EQUAL 64)
|
||||
overrule_arch(mmx "No MMX for Win64")
|
||||
if(CMAKE_VERSION VERSION_LESS 3.10)
|
||||
if(${SIZEOF_CPU} EQUAL 64)
|
||||
overrule_arch(mmx "No MMX for Win64")
|
||||
endif()
|
||||
else()
|
||||
if(ASSUME_64BIT_HOST)
|
||||
overrule_arch(mmx "No MMX for Win64")
|
||||
endif()
|
||||
endif()
|
||||
force_arch(sse "Built-in for MSVC > 2013")
|
||||
force_arch(sse2 "Built-in for MSVC > 2013")
|
||||
|
Loading…
x
Reference in New Issue
Block a user