Simplify x64 detection.

This commit is contained in:
Gonzalo Exequiel Pedone 2021-02-21 16:07:21 -03:00
parent a5d9089b0c
commit 0c8acf5d08
No known key found for this signature in database
GPG key ID: B8B09E63E9B85BAF

View file

@ -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 "")