From 0c8acf5d08cc1e0b6bb8bb9c39ae08d4dc8c24ab Mon Sep 17 00:00:00 2001 From: Gonzalo Exequiel Pedone Date: Sun, 21 Feb 2021 16:07:21 -0300 Subject: [PATCH] Simplify x64 detection. --- commons.cmake | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/commons.cmake b/commons.cmake index 021bbd2..7f63338 100644 --- a/commons.cmake +++ b/commons.cmake @@ -36,21 +36,16 @@ if (WIN32) include(CheckCXXSourceCompiles) check_cxx_source_compiles(" - #if !defined(__amd64__) \\ - && !defined(__amd64) \\ - && !defined(__x86_64_) \\ - && !defined(__x86_64) \\ - && !defined(_M_X64) \\ - && !defined(_M_AMD64) + #ifndef _WIN64 #error Not x64 #endif int main() { return 0; - }" HAVE_X64) + }" IS_WIN64_TARGET) - if (HAVE_X64) + if (IS_WIN64_TARGET) set(TARGET_ARCH x64 CACHE INTERNAL "") else () set(TARGET_ARCH x86 CACHE INTERNAL "")