@ -42,20 +42,32 @@ function(set_simd_flags target_name)
if ( highway_mode STREQUAL "AUTO" )
# s e t t i n g - m a r c h = n a t i v e o n a n M 1 c a u s e s C l a n g t o f r e a k o u t
if ( MSVC )
# MSVC h a s n o - m a r c h = n a t i v e e q u i v a l e n t . w o m p
message ( WARNING "Compiling using MSVC without settig an explicit QUICKTEX_HWY_MODE defaults to serial operations. Please compile with Clang if you need vectorization" )
if ( CLANG_CL )
target_compile_options ( ${ target_name } PUBLIC /clang:-march=native )
else ( )
# MSVC h a s n o - m a r c h = n a t i v e e q u i v a l e n t . w o m p
message ( WARNING "Compiling using cl.exe without settig an explicit QUICKTEX_HWY_MODE defaults to serial operations. Please compile with clang-cl if you need vectorization" )
endif ( )
elseif ( !ARM )
target_compile_options ( ${ target_name } PUBLIC -march=native )
endif ( )
elseif ( highway_mode STREQUAL "SSSE3" )
if ( MSVC )
message ( SEND_ERROR "Compiling using SSSE3 is not supported with the MSVC compiler. Please use AVX or compile withClang" )
if ( CLANG_CL )
target_compile_options ( ${ target_name } PUBLIC /clang:-mssse3 )
else ( )
message ( SEND_ERROR "Compiling using SSSE3 is not supported with the cl.exe compiler. Please use AVX or compile with clang-cl" )
endif ( )
else ( )
target_compile_options ( ${ target_name } PUBLIC -mssse3 )
endif ( )
elseif ( highway_mode STREQUAL "SSE4" )
if ( MSVC )
message ( SEND_ERROR "Compiling using SSE4 is not supported with the MSVC compiler. Please use AVX or compile with Clang" )
if ( CLANG_CL )
target_compile_options ( ${ target_name } PUBLIC /clang:-msse4 )
else ( )
message ( SEND_ERROR "Compiling using SSE4 is not supported with the MSVC compiler. Please use AVX or compile with Clang" )
endif ( )
else ( )
target_compile_options ( ${ target_name } PUBLIC -msse4 )
endif ( )