diff --git a/src/rapidfuzz/CMakeLists.txt b/src/rapidfuzz/CMakeLists.txt index 4eb3b154..6eae538d 100644 --- a/src/rapidfuzz/CMakeLists.txt +++ b/src/rapidfuzz/CMakeLists.txt @@ -31,7 +31,7 @@ function(rf_add_library name) endif() endfunction(rf_add_library) -if(RAPIDFUZZ_ARCH_X64 or RAPIDFUZZ_ARCH_X86) +if(RAPIDFUZZ_ARCH_X64 OR RAPIDFUZZ_ARCH_X86) create_cython_target(_feature_detector_cpp) rf_add_library(_feature_detector_cpp ${_feature_detector_cpp} ${CMAKE_CURRENT_LIST_DIR}/FeatureDetector/CpuInfo.cpp) @@ -56,7 +56,7 @@ target_include_directories(fuzz_cpp PRIVATE ${RF_BASE_DIR}/rapidfuzz) target_link_libraries(fuzz_cpp PRIVATE rapidfuzz::rapidfuzz) install(TARGETS fuzz_cpp LIBRARY DESTINATION src/rapidfuzz) -if(RAPIDFUZZ_ARCH_X64 or RAPIDFUZZ_ARCH_X86) +if(RAPIDFUZZ_ARCH_X64 OR RAPIDFUZZ_ARCH_X86) create_cython_target(fuzz_cpp_avx2) rf_add_library(fuzz_cpp_avx2 ${fuzz_cpp_avx2}) target_compile_features(fuzz_cpp_avx2 PUBLIC cxx_std_17) diff --git a/src/rapidfuzz/_utils.py b/src/rapidfuzz/_utils.py index 233e1eee..04736d87 100644 --- a/src/rapidfuzz/_utils.py +++ b/src/rapidfuzz/_utils.py @@ -84,7 +84,7 @@ def vectorized_import(name: str) -> tuple[Any, list[Any]]: module = optional_import_module(name + "_avx2") if module is not None: return module - elif supports(SSE2): + if supports(SSE2): module = optional_import_module(name + "_sse2") if module is not None: return module diff --git a/src/rapidfuzz/distance/CMakeLists.txt b/src/rapidfuzz/distance/CMakeLists.txt index 76ca2741..de2bc020 100644 --- a/src/rapidfuzz/distance/CMakeLists.txt +++ b/src/rapidfuzz/distance/CMakeLists.txt @@ -50,7 +50,7 @@ target_include_directories( target_link_libraries(metrics_cpp PRIVATE rapidfuzz::rapidfuzz) install(TARGETS metrics_cpp LIBRARY DESTINATION src/rapidfuzz/distance) -if(RAPIDFUZZ_ARCH_X64 or RAPIDFUZZ_ARCH_X86) +if(RAPIDFUZZ_ARCH_X64 OR RAPIDFUZZ_ARCH_X86) create_cython_target(metrics_cpp_avx2) rf_add_library(metrics_cpp_avx2 ${metrics_cpp_avx2}) target_compile_features(metrics_cpp_avx2 PUBLIC cxx_std_17)