From a1a0ed0563e7cc6e42b0186d041e150987893da3 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 14 Jul 2014 23:00:31 -0500 Subject: [PATCH] Support _M_X86[_32/_64] on Linux. These go hand in hand with PR #109 but for Linux as well. These are much more useful defines than what other compilers give us. --- cmake/BuildParameters.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 74b123dcf0..5848051ea1 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -92,7 +92,10 @@ if(_ARCH_64 AND 64BIT_BUILD) endif() set(ARCH_FLAG "-m64 -msse -msse2") - add_definitions(-D_ARCH_64=1) + add_definitions(-D_ARCH_64=1 -D_M_X86=1 -D_M_X86_64=1) + set(_ARCH_64 1) + set(_M_X86 1) + set(_M_X86_64 1) else() message("Compiling 32bit build on 32/64bit architecture") # Do not search library in /usr/lib64 @@ -110,7 +113,10 @@ else() endif() set(ARCH_FLAG "-m32 -msse -msse2 -march=i686") - add_definitions(-D_ARCH_32=1) + add_definitions(-D_ARCH_32=1 -D_M_X86=1 -D_M_X86_32=1) + set(_ARCH_32 1) + set(_M_X86 1) + set(_M_X86_32 1) endif() # * -fPIC option was removed for multiple reasons.