Skip to content

Commit

Permalink
Build shuffle.c with sse2/avx2 options
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Jan 10, 2023
1 parent bcbe147 commit eb981b7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions blosc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,15 @@ if(COMPILER_SUPPORT_SSE2)
# MSVC targets SSE2 by default on 64-bit configurations, but not 32-bit configurations.
if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
set_source_files_properties(shuffle-sse2.c bitshuffle-sse2.c PROPERTIES COMPILE_FLAGS "/arch:SSE2")
set_property(
SOURCE shuffle.c
APPEND PROPERTY COMPILE_OPTIONS "/arch:SSE2")
endif (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
else (MSVC)
set_source_files_properties(shuffle-sse2.c bitshuffle-sse2.c PROPERTIES COMPILE_FLAGS -msse2)
set_property(
SOURCE shuffle.c
APPEND PROPERTY COMPILE_OPTIONS -msse2)
endif (MSVC)

# Define a symbol for the shuffle-dispatch implementation
Expand All @@ -178,9 +184,15 @@ if(COMPILER_SUPPORT_AVX2)
if (MSVC)
set_source_files_properties(shuffle-avx2.c bitshuffle-avx2.c
PROPERTIES COMPILE_FLAGS "/arch:AVX2")
set_property(
SOURCE shuffle.c
APPEND PROPERTY COMPILE_OPTIONS "/arch:AVX2")
else (MSVC)
set_source_files_properties(shuffle-avx2.c bitshuffle-avx2.c
PROPERTIES COMPILE_FLAGS -mavx2)
set_property(
SOURCE shuffle.c
APPEND PROPERTY COMPILE_OPTIONS -mavx2)
endif (MSVC)

# Define a symbol for the shuffle-dispatch implementation
Expand Down

0 comments on commit eb981b7

Please sign in to comment.