diff options
author | Sergey Uzhakov <uzhastik@gmail.com> | 2022-06-22 21:23:19 +0300 |
---|---|---|
committer | Sergey Uzhakov <uzhastik@gmail.com> | 2022-06-22 21:23:19 +0300 |
commit | b86c509aaa5b19d5659a4548395a47c9e87826e9 (patch) | |
tree | 98025d7bd574b788f6679b24f91711ea86bf07ae /cmake | |
parent | f55ada30d924b55d15fad9001944df1323a9598a (diff) | |
download | ydb-b86c509aaa5b19d5659a4548395a47c9e87826e9.tar.gz |
YQ-1154: allow pg translator in OSS
ref:bc7b8dcc7b45e5f527a87a1bed622dff6f06d41a
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/archive.cmake | 13 |
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 |