summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJukka Ojanen <jukka.ojanen@linkotec.net>2015-03-19 13:51:05 +0200
committerJukka Ojanen <jukka.ojanen@linkotec.net>2015-03-19 13:51:05 +0200
commit93a58ef7e0b973411bbed3e07750c7d1fc1e40d5 (patch)
tree5f599579ec805bce81cf7dcd16ac274062bf79ad /CMakeLists.txt
parent2014019a6760e712a019ba639e76aaa8729d8843 (diff)
downloadffts-93a58ef7e0b973411bbed3e07750c7d1fc1e40d5.zip
ffts-93a58ef7e0b973411bbed3e07750c7d1fc1e40d5.tar.gz
ffts_nd.c is using SSE2 intrinsics, detect and include emmintrin.h instead xmmintrin.h, and fix GCC error: inlining failed in call to always_inline '_mm_load_pd': target specific option mismatch by adding "-msse2" instead of "-msse"
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d83367e..5a1a897 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,6 +136,12 @@ if(NOT CMAKE_CROSSCOMPILING)
if(HAVE_XMMINTRIN_H)
add_definitions(-DHAVE_SSE)
endif(HAVE_XMMINTRIN_H)
+
+ # check if the platform has support for SSE2 SIMD extension
+ check_include_file(emmintrin.h HAVE_EMMINTRIN_H)
+ if(HAVE_EMMINTRIN_H)
+ add_definitions(-DHAVE_SSE2)
+ endif(HAVE_EMMINTRIN_H)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
else()
# Check if we can always use detection code above?
@@ -160,9 +166,11 @@ elseif(CMAKE_COMPILER_IS_GNUCC)
list(APPEND FFTS_EXTRA_LIBRARIES m)
endif(HAVE_LIBM)
- if(HAVE_XMMINTRIN_H)
+ if(HAVE_EMMINTRIN_H)
+ add_definitions(-msse2)
+ elseif(HAVE_XMMINTRIN_H)
add_definitions(-msse)
- endif(HAVE_XMMINTRIN_H)
+ endif(HAVE_EMMINTRIN_H)
endif(MSVC)
include_directories(include)
OpenPOWER on IntegriCloud