File tree 1 file changed +10
-1
lines changed 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,16 @@ link_libraries(simdjson-windows-headers test-data)
5
5
if (TARGET benchmark::benchmark)
6
6
add_executable (bench_sax bench_sax.cpp)
7
7
target_link_libraries (bench_sax simdjson-internal -flags simdjson-include -source benchmark::benchmark)
8
- target_compile_options (bench_sax PRIVATE -mavx2 -mbmi -mpclmul -mlzcnt)
8
+ # Don't pass all the compiler options on ARM
9
+ CHECK_CXX_COMPILER_FLAG(-mavx2 HAVE_MAVX2_FLAG)
10
+ if (HAVE_MAVX2_FLAG)
11
+ target_compile_options (bench_sax PRIVATE -mavx2 -mbmi -mpclmul -mlzcnt)
12
+ # Some ARM compilers "support" -mavx2 but don't use it. This makes them not complain.
13
+ CHECK_CXX_COMPILER_FLAG(-Qunused-arguments HAVE_QUNUSED_ARGUMENTS_FLAG)
14
+ if (HAVE_QUNUSED_ARGUMENTS_FLAG)
15
+ target_compile_options (bench_sax PRIVATE -Qunused-arguments)
16
+ endif ()
17
+ endif ()
9
18
endif (TARGET benchmark::benchmark)
10
19
11
20
link_libraries (simdjson simdjson-flags )
You can’t perform that action at this time.
0 commit comments