Skip to content

Commit 315c468

Browse files
committed
Update CMake files
1 parent 30d1a40 commit 315c468

4 files changed

Lines changed: 44 additions & 0 deletions

File tree

examples/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ add_subdirectory(secondary_index_builtin)
66
add_subdirectory(time)
77
add_subdirectory(topic_reader)
88
add_subdirectory(topic_writer/transaction)
9+
add_subdirectory(topic_writer/producer/basic_write)
910
add_subdirectory(ttl)
1011
add_subdirectory(vector_index)
1112
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_producer_buffer_overloaded)
2+
3+
target_link_libraries(topic_writer_producer_buffer_overloaded
4+
PUBLIC
5+
yutil
6+
YDB-CPP-SDK::Topic
7+
YDB-CPP-SDK::Query
8+
)
9+
10+
target_sources(topic_writer_producer_buffer_overloaded
11+
PRIVATE
12+
main.cpp
13+
)
14+
15+
vcs_info(topic_writer_producer_buffer_overloaded)
16+
17+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
18+
target_link_libraries(topic_writer_producer_buffer_overloaded PUBLIC
19+
cpuid_check
20+
)
21+
endif()
22+
23+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
24+
target_link_options(topic_writer_producer_buffer_overloaded 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_producer_buffer_overloaded PRIVATE
32+
-Wl,-platform_version,macos,11.0,11.0
33+
-framework
34+
CoreFoundation
35+
)
36+
endif()

include/ydb-cpp-sdk/client/topic/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,10 @@ generate_enum_serilization(client-ydb_topic-include
2626
include/ydb-cpp-sdk/client/topic/write_events.h
2727
)
2828

29+
generate_enum_serilization(client-ydb_topic-include
30+
${YDB_SDK_SOURCE_DIR}/include/ydb-cpp-sdk/client/topic/producer.h
31+
INCLUDE_HEADERS
32+
include/ydb-cpp-sdk/client/topic/producer.h
33+
)
34+
2935
_ydb_sdk_install_targets(TARGETS client-ydb_topic-include)

src/client/topic/impl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ target_sources(client-ydb_topic-impl
3636
read_session_event.cpp
3737
read_session.cpp
3838
topic_impl.cpp
39+
producer.cpp
3940
topic.cpp
4041
transaction.cpp
4142
write_session_impl.cpp

0 commit comments

Comments
 (0)