Skip to content

Commit e2ae02b

Browse files
committed
bug build: fix YDB builds in CMake
Tests: протестировано CI commit_hash:256eecf8115ad319618e6e3489d82c15e32c7142
1 parent 001e852 commit e2ae02b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ydb/src/ydb/component.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
#include <dynamic_config/variables/YDB_RETRY_BUDGET.hpp>
3131

32-
#ifndef ARCADIA_ROOT
32+
// YDB headers leak `ARCADIA_ROOT` macro, so we use __has_include()
33+
#if __has_include("generated/src/ydb/component.yaml.hpp")
3334
#include "generated/src/ydb/component.yaml.hpp" // Y_IGNORE
3435
#endif
3536

ydb/src/ydb/dist_lock/component_base.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
#include <ydb/impl/dist_lock/semaphore_settings.hpp>
1313

14-
#ifndef ARCADIA_ROOT
14+
// YDB headers leak `ARCADIA_ROOT` macro, so we use __has_include()
15+
#if __has_include("generated/src/ydb/dist_lock/component_base.yaml.hpp")
1516
#include "generated/src/ydb/dist_lock/component_base.yaml.hpp" // Y_IGNORE
1617
#endif
1718

0 commit comments

Comments
 (0)