fix prev.

master
Rob Sykes 2016-05-23 21:53:27 +01:00
parent 52888cd410
commit 384936b256
4 changed files with 11 additions and 11 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
Release/
Debug/
Release*/
Debug*/

View File

@ -35,7 +35,7 @@ else ()
# MSVC x86
"/arch:SSE /fp:fast -D__SSE__"
# Gcc x86
"-Wno-cast-align -msse -mfpmath=sse ${GCC_WIN32_SIMD32_OPTS}"
"-msse -mfpmath=sse ${GCC_WIN32_SIMD32_OPTS}"
# Gcc x86 (old versions)
"-msse -mfpmath=sse"
)

View File

@ -15,11 +15,11 @@ else ()
"/arch:AVX" # MSVC
)
set (TEST_C_SOURCE "
#ifndef __AVX__
#error
#endif
#include <immintrin.h>
int main() {
__m256d a = _mm256_setzero_pd(), b = a, c = _mm256_add_pd(a,b);
return 0;
}
int main() {return 0;}
")
endif ()

View File

@ -4,7 +4,7 @@
# Sets CMAKE_SYSTEM_PROCESSOR (for cross-compiling).
macro (set_system_processor)
if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "")
if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "unknown")
unset(CMAKE_SYSTEM_PROCESSOR)
endif ()
if (NOT DEFINED CMAKE_SYSTEM_PROCESSOR)
@ -22,14 +22,14 @@ macro (set_system_processor)
unset (SYSTEM_PROCESSOR_DETECTED CACHE)
check_c_source_compiles ("${CPU_SOURCE}" SYSTEM_PROCESSOR_DETECTED)
if (SYSTEM_PROCESSOR_DETECTED)
list (GET CPU_LINE 1 DETECTED_SYSTEM_PROCESSOR)
message (STATUS "CMAKE_SYSTEM_PROCESSOR is ${DETECTED_SYSTEM_PROCESSOR}")
list (GET CPU_LINE 1 CMAKE_SYSTEM_PROCESSOR)
message (STATUS "CMAKE_SYSTEM_PROCESSOR is ${CMAKE_SYSTEM_PROCESSOR}")
break ()
endif ()
endforeach ()
endif ()
# N.B. Will not overwrite existing cache variable:
set (CMAKE_SYSTEM_PROCESSOR "${DETECTED_SYSTEM_PROCESSOR}"
set (CMAKE_SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}"
CACHE STRING "Target system processor")
endmacro ()