diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f97c8b..a10b599 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,7 +145,7 @@ ENDIF() DetectSystemName() # Get processor type, sets MACHINE macro -SET(MACHINE ${CMAKE_SYSTEM_PROCESSOR}) +add_definitions(-DMACHINE=${CMAKE_SYSTEM_PROCESSOR}) SET(EXT_LIB_SWIG_RUBY ".so") if(DARWIN) @@ -174,7 +174,7 @@ ENDIF() IF(CMAKE_COMPILER_IS_GNUCXX) SET(RELEASE_COMPILER_FLAGS "-fexpensive-optimizations -frerun-cse-after-loop -fcse-follow-jumps -finline-functions -fschedule-insns2 -fthread-jumps -fforce-addr -fstrength-reduce -funroll-loops") - IF (${MACHINE} MATCHES "x86_64" OR ${MACHINE} MATCHES "i686") + IF (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "i686") SET(RELEASE_COMPILER_FLAGS "${RELEASE_COMPILER_FLAGS} -mfpmath=sse") ENDIF() ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")