Add -march=i686 for 32 bit builds as otherwise defaults to i386 which does not supply one of the intrinsics.

This commit is contained in:
LawrenceK 2012-12-18 14:11:04 +00:00
parent a0cc099614
commit b02765c4c7

View File

@ -98,6 +98,9 @@ endif()
# Compiler-specific flags
if(CMAKE_COMPILER_IS_GNUCC)
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
CHECK_C_COMPILER_FLAG (-Wno-unused-result Wno-unused-result)
if(Wno-unused-result)