Skip to content

Conversation

@Repin-Daniil
Copy link
Contributor

No description provided.

option(YDB_SDK_EXAMPLES "Build YDB C++ SDK examples" On)
set(YDB_SDK_GOOGLE_COMMON_PROTOS_TARGET "" CACHE STRING "Name of cmake target preparing google common proto library")
option(YDB_SDK_USE_RAPID_JSON "Search for rapid json library in system" ON)
option(YDB_SDK_DOWNLOAD_PACKAGES "Download with CPM if there is no system-provided libraries" ON) # todo изменить сообщение
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сложное поведение как по мне. Проще дать пользователю выбор download, system или none для каждого пакета. А по умолчанию сделать download

Copy link
Contributor Author

@Repin-Daniil Repin-Daniil Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подглядел в доке усервера, там есть небольшое объяснение

Как мне кажется, получается более гибко, так можно будет одной переменной отключить скачивание всех пакетов разом. Полезно будет потом на PPA, где не будет интернета, или в случае, когда хотим устанавливать все

А так ниже для каждого пакета появляются свои переменные для установки, которые по-умолчанию равны этой и их можно переопределить вручную

)
endfunction()

function(mark_targets_as_system directory)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А эта функция для чего нужна?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Там была проблема, что установка и сборка зависимостей была уже во время нашей сборки, а из них вылетали предупреждения. Увидел что в усервере отключали так, помогло

# If A uses find_package(B), and we install A and B using CPM, then: 1. make sure to call write_package_stub in SetupB
# 2. make sure to call SetupB at the beginning of SetupA
function(write_package_stub PACKAGE_NAME)
file(WRITE "${CMAKE_BINARY_DIR}/package_stubs/${PACKAGE_NAME}Config.cmake" )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
file(WRITE "${CMAKE_BINARY_DIR}/package_stubs/${PACKAGE_NAME}Config.cmake" )
file(WRITE "${CMAKE_BINARY_DIR}/package_stubs/${PACKAGE_NAME}Config.cmake")

@@ -0,0 +1,75 @@
include_guard()

if(NOT DEFINED CPM_USE_NAMED_CACHE_DIRECTORIES)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А что этот флаг делает?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот тут увидел, вроде он не вредит и есть польза ссылка

option(YDB_SDK_FORCE_DOWNLOAD_ABSEIL "Download Abseil even if it exists in a system" ${YDB_SDK_DOWNLOAD_PACKAGES})

if(NOT YDB_SDK_FORCE_DOWNLOAD_ABSEIL)
set(ABSL_PROPAGATE_CXX_STD ON)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем этот флаг тут нужен? Он же нужен для сборки и установки abseil, тут-то зачем?

abseil/abseil-cpp
OPTIONS
"ABSL_PROPAGATE_CXX_STD ON"
"ABSL_ENABLE_INSTALL ON"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А тут точно нужен этот флаг?

endif()
endmacro()

if(NOT YDB_SDK_FORCE_DOWNLOAD_GRPC)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А почему тут поиск gRPC так усложнился?

# include(${CMAKE_CURRENT_LIST_DIR}/SetupProtobuf.cmake)
include(DownloadUsingCPM)

set(YDB_SDK_GPRC_BUILD_FROM_SOURCE ON)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем этот флаг?

"BUILD_SHARED_LIBS OFF"
"CARES_BUILD_TOOLS OFF"
"RE2_BUILD_TESTING OFF"
"OPENSSL_NO_ASM ON"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем OPENSSL_NO_ASM ставить?

@Repin-Daniil Repin-Daniil marked this pull request as draft October 28, 2025 08:53
@Gazizonoki
Copy link
Collaborator

Duplicates #566

@Gazizonoki Gazizonoki closed this Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants