forked from milvus-io/milvus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (26 loc) · 1.37 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
set(BITSET_SRCS
detail/platform/dynamic.cpp
)
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
list(APPEND BITSET_SRCS
detail/platform/x86/avx2-inst.cpp
detail/platform/x86/avx512-inst.cpp
detail/platform/x86/instruction_set.cpp
)
set_source_files_properties(detail/platform/x86/avx512-inst.cpp PROPERTIES COMPILE_FLAGS "-mavx512f -mavx512bw -mavx512vl -mavx512dq")
set_source_files_properties(detail/platform/x86/avx2-inst.cpp PROPERTIES COMPILE_FLAGS "-mavx2 -mavx -mfma")
# set_source_files_properties(detail/platform/dynamic.cpp PROPERTIES COMPILE_FLAGS "-mavx512f -mavx512bw -mavx512vl -mavx512dq")
# set_source_files_properties(detail/platform/dynamic.cpp PROPERTIES COMPILE_FLAGS "-mavx2 -mavx -mfma")
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm*")
list(APPEND BITSET_SRCS
detail/platform/arm/neon-inst.cpp
detail/platform/arm/sve-inst.cpp
)
# targeting AWS graviton,
# https://github.com/aws/aws-graviton-getting-started/blob/main/c-c%2B%2B.md
# let dynamic.cpp know that SVE is available
# comment it out for now
# set_source_files_properties(detail/platform/dynamic.cpp PROPERTIES COMPILE_FLAGS "-mcpu=neoverse-v1")
set_source_files_properties(detail/platform/arm/sve-inst.cpp PROPERTIES COMPILE_FLAGS "-mcpu=neoverse-v1")
endif()
add_library(milvus_bitset ${BITSET_SRCS})