File tree 3 files changed +16
-4
lines changed 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 9
9
run : |
10
10
mkdir -p ../build
11
11
rm -rf ../build/*
12
- cmake -DYDB_SDK_TESTS=On -DYDB_SDK_EXAMPLES=On --preset release
12
+ cmake -DYDB_SDK_TESTS=On -DYDB_SDK_EXAMPLES=On -DARCADIA_ROOT="../ydb-cpp-sdk" -DARCADIA_BUILD_ROOT="." - -preset release
13
13
- name : Build
14
14
shell : bash
15
15
run : |
Original file line number Diff line number Diff line change @@ -18,6 +18,18 @@ set(YDB-CPP-SDK_AVAILABLE_COMPONENTS "" CACHE INTERNAL "")
18
18
set (YDB-CPP-SDK_COMPONENT_TARGETS "" CACHE INTERNAL "" )
19
19
file (READ "src/client/resources/ydb_sdk_version.txt" YDB_SDK_VERSION)
20
20
21
+ #[=============================================================================[
22
+ NOTE: if `ccache` is used with the environment variable `CCACHE_BASEDIR`,
23
+ these cached variable should be set manually by passing them to `cmake` as
24
+ `-DARCADIA_ROOT=source/path/relative/to/build/dir` and
25
+ `-DARCADIA_BUILD_ROOT=.`, because in that case the macro `__FILE__` will be
26
+ expanded to a relative path, even if the source code file was specified as
27
+ an absolute path, and we have to know the proper prefix of that path.
28
+ See details: https://ccache.dev/manual/3.1.html#_compiling_in_different_directories
29
+ #]=============================================================================]
30
+ set (ARCADIA_ROOT ${YDB_SDK_SOURCE_DIR} CACHE PATH "The source root directory" )
31
+ set (ARCADIA_BUILD_ROOT ${YDB_SDK_BINARY_DIR} CACHE PATH "The build root directory" )
32
+
21
33
include (GNUInstallDirs)
22
34
include (CMakePackageConfigHelpers)
23
35
Original file line number Diff line number Diff line change @@ -701,10 +701,10 @@ elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
701
701
)
702
702
endif ()
703
703
704
- # These definitions are needed to `util/system/src_root.h` works properly
704
+ # NOTE: these definitions are needed to `util/system/src_root.h` works properly
705
705
target_compile_definitions (yutil PUBLIC
706
- ARCADIA_ROOT=${YDB_SDK_SOURCE_DIR }
707
- ARCADIA_BUILD_ROOT=${YDB_SDK_BINARY_DIR }
706
+ ARCADIA_ROOT=${ARCADIA_ROOT }
707
+ ARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT }
708
708
)
709
709
710
710
_ydb_sdk_install_targets(TARGETS yutil)
You can’t perform that action at this time.
0 commit comments