Skip to content

Commit

Permalink
fix: avx on raspberry pi 4
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Aug 30, 2023
1 parent d6379da commit 43c848c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmake/DetectArchitecture.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ endif()

set(CMAKE_REQUIRED_FLAGS_SAVE "${CMAKE_REQUIRED_FLAGS}")

set(AVX_NAME "T_Fallback")
set(AVX_NAME "T_fallback")
if ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "AMD64"))

foreach(INSTRUCTION_SET IN LISTS INSTRUCTION_SETS)
Expand All @@ -56,5 +56,5 @@ endforeach()
message(STATUS "Detected ${CMAKE_SYSTEM_PROCESSOR} SSE type: ${AVX_DISPLAY}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_SAVE}")
else()
message(STATUS "SSE not supported by architecture ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "SSE not supported by architecture ${CMAKE_SYSTEM_PROCESSOR} ${AVX_NAME}")
endif()
5 changes: 3 additions & 2 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ add_compile_definitions(DPP_OS=${CMAKE_SYSTEM_NAME})
if(${AVX_TYPE} STREQUAL "OFF")
include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/DetectArchitecture.cmake")
add_compile_options("${AVX_FLAG}")
add_compile_definitions("${AVX_NAME}")
message("--- AVX type: ${AVX_NAME}")
else()
message("-- AVX type overridden by configuration: ${AVX_TYPE}")
add_compile_definitions("${AVX_TYPE}")
endif()

add_compile_definitions("${AVX_TYPE}")

if(WIN32 AND NOT MINGW)
if (NOT WINDOWS_32_BIT)
message("-- Building for windows with precompiled packaged dependencies")
Expand Down

0 comments on commit 43c848c

Please sign in to comment.