canonical_host: assume x86_64 for msvc
This is a short term bandaid to get builds testable under Windows.
This commit is contained in:
parent
576a112da8
commit
7917ab4ae8
@ -1,7 +1,11 @@
|
|||||||
|
# attempt to find a consistent name for the host (the architecture on which
|
||||||
|
# the code will execute)
|
||||||
macro (canonical_host)
|
macro (canonical_host)
|
||||||
if (NOT DEFINED host_cpu)
|
if (NOT DEFINED host_cpu)
|
||||||
message (STATUS "checking the host CPU")
|
message (STATUS "checking the host CPU")
|
||||||
|
|
||||||
|
# we have a sane compiler, so ask it directly for the architecture.
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
execute_process (
|
execute_process (
|
||||||
COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
|
COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
|
||||||
RESULT_VARIABLE __canonical_host_result
|
RESULT_VARIABLE __canonical_host_result
|
||||||
@ -13,8 +17,13 @@ macro (canonical_host)
|
|||||||
endif (${__canonical_host_result})
|
endif (${__canonical_host_result})
|
||||||
|
|
||||||
string(REGEX MATCH "^([^-\]+)" host_cpu ${__canonical_host_output})
|
string(REGEX MATCH "^([^-\]+)" host_cpu ${__canonical_host_output})
|
||||||
set (host_cpu "${host_cpu}" CACHE INTERNAL "host cpu type")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
set (host_cpu "x86_64")
|
||||||
|
else ()
|
||||||
|
message (FATAL_ERROR "unknown compiler")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set (host_cpu "x86_64" CACHE INTERNAL "host cpu type")
|
||||||
message (STATUS "checking the host CPU - found '${host_cpu}'")
|
message (STATUS "checking the host CPU - found '${host_cpu}'")
|
||||||
endif ()
|
endif ()
|
||||||
endmacro (canonical_host)
|
endmacro (canonical_host)
|
||||||
|
Loading…
Reference in New Issue
Block a user