Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lemire committed Dec 4, 2023
1 parent 80cf6ad commit 8b207a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ set_target_properties(despacer PROPERTIES POSITION_INDEPENDENT_CODE ON) #-fPIC
target_compile_features(despacer PRIVATE "c_std_99")

message(STATUS "CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_C_COMPILER_ID}")

if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL AMD64)
if(MSVC)
target_compile_options(despacer PRIVATE /arch:native)
else()
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
message(STATUS "compiling with -march=native")
target_compile_options(despacer PRIVATE -march=native)
endif()
endif()
Expand Down
1 change: 0 additions & 1 deletion src/despacer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,6 @@ size_t sse42_despace_branchless_lookup(char *bytes,
#endif

#ifdef __AVX2__

#ifdef _MSC_VER
#include <xmmintrin.h>
#include <mmintrin.h>
Expand Down

0 comments on commit 8b207a6

Please sign in to comment.