summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJukka Ojanen <jukka.ojanen@linkotec.net>2015-03-10 12:19:38 +0200
committerJukka Ojanen <jukka.ojanen@linkotec.net>2015-03-10 12:19:38 +0200
commitebae52c72d3488d123c6ca9e31dfd95872d0575c (patch)
treee85dd9d4289b87fde3dbd4cd2b77bb43760600dc /CMakeLists.txt
parentdf3e73b193429e9b3db977a3aa67a77a0155e39c (diff)
downloadffts-ebae52c72d3488d123c6ca9e31dfd95872d0575c.zip
ffts-ebae52c72d3488d123c6ca9e31dfd95872d0575c.tar.gz
Check existence of various headers and add guards for them
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ef0a9d..383c01f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,33 @@ include(CheckIncludeFile)
add_definitions(-DFFTS_CMAKE_GENERATED)
+# check existence of various headers
+check_include_file(stdint.h HAVE_STDINT_H)
+check_include_file(stdlib.h HAVE_STDLIB_H)
+check_include_file(string.h HAVE_STRING_H)
+check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
+check_include_file(unistd.h HAVE_UNISTD_H)
+
+if(HAVE_STDINT_H)
+ add_definitions(-DHAVE_STDINT_H)
+endif(HAVE_STDINT_H)
+
+if(HAVE_STDLIB_H)
+ add_definitions(-DHAVE_STDLIB_H)
+endif(HAVE_STDLIB_H)
+
+if(HAVE_STRING_H)
+ add_definitions(-DHAVE_STRING_H)
+endif(HAVE_STRING_H)
+
+if(HAVE_SYS_MMAN_H)
+ add_definitions(-DHAVE_SYS_MMAN_H)
+endif(HAVE_SYS_MMAN_H)
+
+if(HAVE_UNISTD_H)
+ add_definitions(-DHAVE_UNISTD_H)
+endif(HAVE_UNISTD_H)
+
# check if the platform has support for SSE SIMD extension
check_include_file(xmmintrin.h HAVE_XMMINTRIN_H)
if(HAVE_XMMINTRIN_H)
@@ -43,6 +70,7 @@ else()
# check if the platform has support NEON SIMD extension
check_include_file(arm_neon.h HAVE_ARM_NEON_H)
if(HAVE_ARM_NEON_H)
+ add_definitions(-DHAVE_NEON)
endif(HAVE_ARM_NEON_H)
endif(HAVE_XMMINTRIN_H)
OpenPOWER on IntegriCloud