diff options
author | Michael Dickens <mlk@alum.mit.edu> | 2014-06-17 14:23:38 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2014-06-26 14:35:23 -0400 |
commit | 093314f01ffee01ca970df01e5ae48d173c08e47 (patch) | |
tree | 4fd7160785246c554cc232c572e74c85e3ac238c | |
parent | 5a9acd9f3803dc17ab7d1099fd7473d209b74351 (diff) |
cmake: runtime: On Darwin, malloc is always aligned to a 16 byte boundary, to work with Altivec and SSE (etc) SIMD; so, set ALIGNED_MALLOC to 16 for those Darwin systems that do not have posix_memalign.
-rw-r--r-- | gnuradio-runtime/ConfigChecks.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gnuradio-runtime/ConfigChecks.cmake b/gnuradio-runtime/ConfigChecks.cmake index 46e15b5051..9487d6ad60 100644 --- a/gnuradio-runtime/ConfigChecks.cmake +++ b/gnuradio-runtime/ConfigChecks.cmake @@ -122,7 +122,12 @@ CHECK_CXX_SOURCE_COMPILES(" ) GR_ADD_COND_DEF(HAVE_VALLOC) -ADD_DEFINITIONS(-DALIGNED_MALLOC=0) +if(APPLE) + # Apple's malloc has been 16 byte aligned since at least 10.4 + ADD_DEFINITIONS(-DALIGNED_MALLOC=16) +else() + ADD_DEFINITIONS(-DALIGNED_MALLOC=0) +endif() ######################################################################## SET(CMAKE_REQUIRED_LIBRARIES -lpthread) |