Fat runtime

This commit is contained in:
Matthew Barr
2016-11-02 11:01:28 +11:00
parent 2214296b7f
commit c3a73446ee
17 changed files with 411 additions and 83 deletions

View File

@@ -11,7 +11,8 @@ else ()
endif ()
set (CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS}")
set (CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS} ${ARCH_C_FLAGS}")
# ensure we have the minimum of SSSE3 - call a SSSE3 intrinsic
CHECK_C_SOURCE_COMPILES("#include <${INTRIN_INC_H}>
int main() {
@@ -19,10 +20,6 @@ int main() {
(void)_mm_shuffle_epi8(a, a);
}" HAVE_SSSE3)
if (NOT HAVE_SSSE3)
message(FATAL_ERROR "A minimum of SSSE3 compiler support is required")
endif ()
# now look for AVX2
CHECK_C_SOURCE_COMPILES("#include <${INTRIN_INC_H}>
#if !defined(__AVX2__)
@@ -34,9 +31,5 @@ int main(){
(void)_mm256_xor_si256(z, z);
}" HAVE_AVX2)
if (NOT HAVE_AVX2)
message(STATUS "Building without AVX2 support")
endif ()
unset (CMAKE_REQUIRED_FLAGS)
unset (INTRIN_INC_H)