CMakeLists: Disable architecture checks with -DENABLE_GENERIC=1
This commit is contained in:
parent
a66e4585a0
commit
6773546d5c
|
@ -65,14 +65,16 @@ function(detect_architecture symbol arch)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if (MSVC)
|
if (NOT ENABLE_GENERIC)
|
||||||
|
if (MSVC)
|
||||||
detect_architecture("_M_AMD64" x86_64)
|
detect_architecture("_M_AMD64" x86_64)
|
||||||
detect_architecture("_M_IX86" x86)
|
detect_architecture("_M_IX86" x86)
|
||||||
detect_architecture("_M_ARM" ARM)
|
detect_architecture("_M_ARM" ARM)
|
||||||
else()
|
else()
|
||||||
detect_architecture("__x86_64__" x86_64)
|
detect_architecture("__x86_64__" x86_64)
|
||||||
detect_architecture("__i386__" x86)
|
detect_architecture("__i386__" x86)
|
||||||
detect_architecture("__arm__" ARM)
|
detect_architecture("__arm__" ARM)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if (NOT DEFINED ARCHITECTURE)
|
if (NOT DEFINED ARCHITECTURE)
|
||||||
set(ARCHITECTURE "GENERIC")
|
set(ARCHITECTURE "GENERIC")
|
||||||
|
|
Reference in New Issue