Simplify x64 detection.
This commit is contained in:
parent
a5d9089b0c
commit
0c8acf5d08
1 changed files with 3 additions and 8 deletions
|
@ -36,21 +36,16 @@ if (WIN32)
|
||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
|
|
||||||
check_cxx_source_compiles("
|
check_cxx_source_compiles("
|
||||||
#if !defined(__amd64__) \\
|
#ifndef _WIN64
|
||||||
&& !defined(__amd64) \\
|
|
||||||
&& !defined(__x86_64_) \\
|
|
||||||
&& !defined(__x86_64) \\
|
|
||||||
&& !defined(_M_X64) \\
|
|
||||||
&& !defined(_M_AMD64)
|
|
||||||
#error Not x64
|
#error Not x64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}" HAVE_X64)
|
}" IS_WIN64_TARGET)
|
||||||
|
|
||||||
if (HAVE_X64)
|
if (IS_WIN64_TARGET)
|
||||||
set(TARGET_ARCH x64 CACHE INTERNAL "")
|
set(TARGET_ARCH x64 CACHE INTERNAL "")
|
||||||
else ()
|
else ()
|
||||||
set(TARGET_ARCH x86 CACHE INTERNAL "")
|
set(TARGET_ARCH x86 CACHE INTERNAL "")
|
||||||
|
|
Loading…
Reference in a new issue