From 0fa2e0b284fba165303f887c912f0d01ef2da5e0 Mon Sep 17 00:00:00 2001 From: Ivan Skriabin <56287715+Malevrovich@users.noreply.github.com> Date: Fri, 26 Jun 2026 14:31:28 +0300 Subject: [PATCH] fix build: fix macos parallel builds Ensure generated protobuf headers exist before unittest sources compile. target_link_libraries only guarantees the dependency for linking, not for header generation in parallel builds (e.g. Ninja on macOS CI). --- libraries/protobuf/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/protobuf/CMakeLists.txt b/libraries/protobuf/CMakeLists.txt index 5af7a207c369..471da809d143 100644 --- a/libraries/protobuf/CMakeLists.txt +++ b/libraries/protobuf/CMakeLists.txt @@ -34,4 +34,8 @@ if(USERVER_BUILD_TESTS) $ ) target_link_libraries(userver-protobuf-unittest-proto PUBLIC protobuf::libprotobuf) + + if(TARGET userver-protobuf-unittest) + add_dependencies(userver-protobuf-unittest userver-protobuf-unittest-proto) + endif() endif()