detection of other CPU features

This commit is contained in:
Ilya Lavrenov
2015-01-12 10:59:30 +03:00
parent 3a426660ea
commit bc394e7516
6 changed files with 157 additions and 27 deletions

View File

@@ -122,16 +122,19 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(ENABLE_POWERPC)
add_extra_compiler_option("-mcpu=G3 -mtune=G5")
endif()
if(ENABLE_POPCNT)
add_extra_compiler_option(-mpopcnt)
endif()
if(ENABLE_SSE)
add_extra_compiler_option(-msse)
endif()
if(ENABLE_SSE2)
add_extra_compiler_option(-msse2)
endif()
if (ENABLE_NEON)
if(ENABLE_NEON)
add_extra_compiler_option("-mfpu=neon")
endif()
if (ENABLE_VFPV3 AND NOT ENABLE_NEON)
if(ENABLE_VFPV3 AND NOT ENABLE_NEON)
add_extra_compiler_option("-mfpu=vfpv3")
endif()
@@ -162,6 +165,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-msse4.2)
endif()
endif()
if(ENABLE_FMA3)
add_extra_compiler_option(-mfma)
endif()
endif(NOT MINGW)
if(X86 OR X86_64)