Build: Use -maltivec when testing AltiVec support
Doesn't seem to be necessary with recent Linux/GCC configurations, but it is definitely necessary with OS X.
This commit is contained in:
@@ -284,6 +284,8 @@ endif()
|
|||||||
|
|
||||||
elseif(CPU_TYPE STREQUAL "powerpc")
|
elseif(CPU_TYPE STREQUAL "powerpc")
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_FLAGS -maltivec)
|
||||||
|
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <altivec.h>
|
#include <altivec.h>
|
||||||
int main(void) {
|
int main(void) {
|
||||||
@@ -291,6 +293,8 @@ check_c_source_compiles("
|
|||||||
return vi[0];
|
return vi[0];
|
||||||
}" HAVE_ALTIVEC)
|
}" HAVE_ALTIVEC)
|
||||||
|
|
||||||
|
unset(CMAKE_REQUIRED_FLAGS)
|
||||||
|
|
||||||
if(NOT HAVE_ALTIVEC)
|
if(NOT HAVE_ALTIVEC)
|
||||||
simd_fail("SIMD extensions not available for this CPU (PowerPC SPE)")
|
simd_fail("SIMD extensions not available for this CPU (PowerPC SPE)")
|
||||||
return()
|
return()
|
||||||
|
|||||||
Reference in New Issue
Block a user