From 6773546d5c727b2ec0e8807f26f1e1796135bc5d Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 8 Jan 2018 17:54:37 +0100 Subject: [PATCH] CMakeLists: Disable architecture checks with -DENABLE_GENERIC=1 --- CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b7c7c48abe..25a5ef57ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,14 +65,16 @@ function(detect_architecture symbol arch) endif() endfunction() -if (MSVC) - detect_architecture("_M_AMD64" x86_64) - detect_architecture("_M_IX86" x86) - detect_architecture("_M_ARM" ARM) -else() - detect_architecture("__x86_64__" x86_64) - detect_architecture("__i386__" x86) - detect_architecture("__arm__" ARM) +if (NOT ENABLE_GENERIC) + if (MSVC) + detect_architecture("_M_AMD64" x86_64) + detect_architecture("_M_IX86" x86) + detect_architecture("_M_ARM" ARM) + else() + detect_architecture("__x86_64__" x86_64) + detect_architecture("__i386__" x86) + detect_architecture("__arm__" ARM) + endif() endif() if (NOT DEFINED ARCHITECTURE) set(ARCHITECTURE "GENERIC")