Skip to content

Commit 3793d1a

Browse files
committed
Updated CMakeLists for import 16
1 parent 1fc85c3 commit 3793d1a

File tree

4 files changed

+84
-6
lines changed

4 files changed

+84
-6
lines changed

examples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ add_subdirectory(pagination)
44
add_subdirectory(secondary_index)
55
add_subdirectory(secondary_index_builtin)
66
add_subdirectory(topic_reader)
7+
add_subdirectory(topic_writer/transaction)
78
add_subdirectory(ttl)
89
add_subdirectory(vector_index)
10+
add_subdirectory(vector_index_builtin)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
add_executable(topic_writer_transaction)
2+
3+
target_link_libraries(topic_writer_transaction
4+
PUBLIC
5+
yutil
6+
YDB-CPP-SDK::Topic
7+
YDB-CPP-SDK::Query
8+
)
9+
10+
target_sources(topic_writer_transaction
11+
PRIVATE
12+
main.cpp
13+
)
14+
15+
vcs_info(topic_writer_transaction)
16+
17+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
18+
target_link_libraries(topic_writer_transaction PUBLIC
19+
cpuid_check
20+
)
21+
endif()
22+
23+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
24+
target_link_options(topic_writer_transaction PRIVATE
25+
-ldl
26+
-lrt
27+
-Wl,--no-as-needed
28+
-lpthread
29+
)
30+
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
31+
target_link_options(topic_writer_transaction PRIVATE
32+
-Wl,-platform_version,macos,11.0,11.0
33+
-framework
34+
CoreFoundation
35+
)
36+
endif()

examples/vector_index/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
add_executable(vector_index)
22

3-
target_link_libraries(vector_index PUBLIC
4-
yutil
5-
getopt
6-
YDB-CPP-SDK::Table
3+
target_link_libraries(vector_index
4+
PUBLIC
5+
yutil
6+
getopt
7+
YDB-CPP-SDK::Table
78
)
89

910
target_sources(vector_index PRIVATE
10-
${YDB_SDK_SOURCE_DIR}/examples/vector_index/main.cpp
11-
${YDB_SDK_SOURCE_DIR}/examples/vector_index/vector_index.cpp
11+
main.cpp
12+
vector_index.cpp
1213
)
1314

1415
vcs_info(vector_index)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
add_executable(vector_index_builtin)
2+
3+
target_link_libraries(vector_index_builtin
4+
PUBLIC
5+
yutil
6+
getopt
7+
YDB-CPP-SDK::Query
8+
YDB-CPP-SDK::Table
9+
YDB-CPP-SDK::Helpers
10+
)
11+
12+
target_sources(vector_index_builtin
13+
PRIVATE
14+
main.cpp
15+
vector_index.cpp
16+
)
17+
18+
vcs_info(vector_index_builtin)
19+
20+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
21+
target_link_libraries(vector_index_builtin PUBLIC
22+
cpuid_check
23+
)
24+
endif()
25+
26+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
27+
target_link_options(vector_index_builtin PRIVATE
28+
-ldl
29+
-lrt
30+
-Wl,--no-as-needed
31+
-lpthread
32+
)
33+
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
34+
target_link_options(vector_index_builtin PRIVATE
35+
-Wl,-platform_version,macos,11.0,11.0
36+
-framework
37+
CoreFoundation
38+
)
39+
endif()

0 commit comments

Comments
 (0)