[Rock-dev] Enable SSE2 typedefs (emmintrin.h)

Jakob Schwendner jakob.schwendner at dfki.de
Thu May 3 08:50:50 CEST 2012


On 05/02/2012 07:09 PM, Leif Christensen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> on my 32 bit ubuntu, the compilation of components, that include
> libelas/elas.h fails, because the type __m128i is not declared.
>
> elas.h includes the mmx extension header emmintrin.h, which checks for
> the define __SSE2__ and only then declares __m128i and others.
>
> On my machine (where /proc/cpuinfo has the sse2 flag), __SSE2__ is
> only defined if I add -msse2 to my cxx flags.
>
> I would suggest to use something like FindSSE.cmake (for example from
> http://gitorious.org/vc/vc/blobs/master/cmake/FindSSE.cmake) to check
> for SSE-extensions and then use SSEx_FOUND in the CMakeList.txt files
> of packages that use libelas, e.g.
>
> IF(SSE2_FOUND)
>   ADD_DEFINITIONS(-msse2)
> ENDIF(SSE2_FOUND)
> [...]
>
> The only standard CMAKE_MODULE_PATH in rock seems to be
> [...]/base/types/cmake, so we could put FindSSE.cmake there. There are
> already other .cmake files, even though I don't know what they have to
> do with base types.
>
> Thoughts on that?
+1



More information about the Rock-dev mailing list