File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1010########################################################################
1111# Project setup
1212########################################################################
13- cmake_minimum_required (VERSION 3.8)
13+ # We use `IS_64BIT now: https://cmake.org/cmake/help/latest/command/cmake_host_system_information.html
14+ cmake_minimum_required (VERSION 3.10)
15+
1416set (CMAKE_BUILD_TYPE
1517 ${CMAKE_BUILD_TYPE}
1618 CACHE STRING "Choose build type: None Debug Release RelWithDebInfo MinSizeRel" )
Original file line number Diff line number Diff line change @@ -255,17 +255,16 @@ endif()
255255########################################################################
256256if (NOT CROSSCOMPILE_MULTILIB AND CPU_IS_x86)
257257 include (CheckTypeSize)
258- check_type_size( "void*[8]" SIZEOF_CPU BUILTIN_TYPES_ONLY )
259- if (${SIZEOF_CPU} EQUAL 64 )
258+ cmake_host_system_information (RESULT ASSUME_64BIT_HOST QUERY IS_64BIT )
259+ if (ASSUME_64BIT_HOST )
260260 overrule_arch(32 "CPU width is 64 bits" )
261- endif ()
262- if (${SIZEOF_CPU} EQUAL 32)
261+ else ()
263262 overrule_arch(64 "CPU width is 32 bits" )
264263 endif ()
265264
266265 #MSVC 64 bit does not have MMX, overrule it
267266 if (MSVC )
268- if (${SIZEOF_CPU} EQUAL 64 )
267+ if (ASSUME_64BIT_HOST )
269268 overrule_arch(mmx "No MMX for Win64" )
270269 endif ()
271270 force_arch(sse "Built-in for MSVC > 2013" )
You can’t perform that action at this time.
0 commit comments