aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authoruzhas <uzhas@ydb.tech>2022-08-03 16:49:05 +0300
committeruzhas <uzhas@ydb.tech>2022-08-03 16:49:05 +0300
commit9f5a9f6bb8e71744dba93d589498c3400ef37cf6 (patch)
treedeeec1c662834706dd83e8a65f90b7c619aa6956 /cmake
parent99ca7f704a079771da487ee672539da698d0d3b8 (diff)
downloadydb-9f5a9f6bb8e71744dba93d589498c3400ef37cf6.tar.gz
revert back: link ydbd with pg wrapper to support pg types
Diffstat (limited to 'cmake')
-rw-r--r--cmake/archive.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/archive.cmake b/cmake/archive.cmake
new file mode 100644
index 0000000000..f822498dae
--- /dev/null
+++ b/cmake/archive.cmake
@@ -0,0 +1,13 @@
+find_package(Python3 REQUIRED)
+
+function(target_rodata_sources TgtName Scope)
+ foreach(rodata ${ARGN})
+ get_filename_component(CppVar ${rodata} NAME_WLE)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CppVar}.cpp
+ COMMAND Python3::Interpreter ${CMAKE_SOURCE_DIR}/build/scripts/rodata2cpp.py ${CppVar} ${rodata} ${CMAKE_CURRENT_BINARY_DIR}/${CppVar}.cpp
+ DEPENDS ${CMAKE_SOURCE_DIR}/build/scripts/rodata2cpp.py ${rodata}
+ )
+ target_sources(${TgtName} ${Scope} ${CMAKE_CURRENT_BINARY_DIR}/${CppVar}.cpp)
+ endforeach()
+endfunction() \ No newline at end of file