diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-03-09 12:42:44 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-03-09 12:42:44 +0300 |
commit | 6324d075a5e80b6943b5de6b465b775050fe83df (patch) | |
tree | e02ce32e988042438f64df770a528164ac572879 /library/cpp/monlib/encode | |
parent | 039e25e1597bec288de44e5061c1b84e195add08 (diff) | |
download | ydb-6324d075a5e80b6943b5de6b465b775050fe83df.tar.gz |
Intermediate changes
Diffstat (limited to 'library/cpp/monlib/encode')
14 files changed, 205 insertions, 0 deletions
diff --git a/library/cpp/monlib/encode/CMakeLists.txt b/library/cpp/monlib/encode/CMakeLists.txt index 8f8c04afe5..d90657116d 100644 --- a/library/cpp/monlib/encode/CMakeLists.txt +++ b/library/cpp/monlib/encode/CMakeLists.txt @@ -10,6 +10,8 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT AND include(CMakeLists.linux-aarch64.txt) elseif (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAVE_CUDA) include(CMakeLists.linux-x86_64.txt) endif() diff --git a/library/cpp/monlib/encode/CMakeLists.windows-x86_64.txt b/library/cpp/monlib/encode/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..a74b6d023d --- /dev/null +++ b/library/cpp/monlib/encode/CMakeLists.windows-x86_64.txt @@ -0,0 +1,40 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +add_subdirectory(buffered) +add_subdirectory(json) +add_subdirectory(legacy_protobuf) +add_subdirectory(prometheus) +add_subdirectory(spack) +add_subdirectory(text) +get_built_tool_path( + TOOL_enum_parser_bin + TOOL_enum_parser_dependency + tools/enum_parser/enum_parser + enum_parser +) + +add_library(cpp-monlib-encode) +target_link_libraries(cpp-monlib-encode PUBLIC + contrib-libs-cxxsupp + yutil + cpp-monlib-metrics + tools-enum_parser-enum_serialization_runtime +) +target_sources(cpp-monlib-encode PRIVATE + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/encoder.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/encoder_state.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/format.cpp +) +generate_enum_serilization(cpp-monlib-encode + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/encoder_state_enum.h + GEN_HEADER + ${CMAKE_BINARY_DIR}/library/cpp/monlib/encode/encoder_state_enum.h_serialized.h + INCLUDE_HEADERS + library/cpp/monlib/encode/encoder_state_enum.h +) diff --git a/library/cpp/monlib/encode/buffered/CMakeLists.txt b/library/cpp/monlib/encode/buffered/CMakeLists.txt index 8f8c04afe5..d90657116d 100644 --- a/library/cpp/monlib/encode/buffered/CMakeLists.txt +++ b/library/cpp/monlib/encode/buffered/CMakeLists.txt @@ -10,6 +10,8 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT AND include(CMakeLists.linux-aarch64.txt) elseif (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAVE_CUDA) include(CMakeLists.linux-x86_64.txt) endif() diff --git a/library/cpp/monlib/encode/buffered/CMakeLists.windows-x86_64.txt b/library/cpp/monlib/encode/buffered/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..e867afbb8c --- /dev/null +++ b/library/cpp/monlib/encode/buffered/CMakeLists.windows-x86_64.txt @@ -0,0 +1,20 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(monlib-encode-buffered) +target_link_libraries(monlib-encode-buffered PUBLIC + contrib-libs-cxxsupp + yutil + cpp-monlib-encode + cpp-monlib-metrics +) +target_sources(monlib-encode-buffered PRIVATE + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/buffered/buffered_encoder_base.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/buffered/string_pool.cpp +) diff --git a/library/cpp/monlib/encode/json/CMakeLists.txt b/library/cpp/monlib/encode/json/CMakeLists.txt index 8f8c04afe5..d90657116d 100644 --- a/library/cpp/monlib/encode/json/CMakeLists.txt +++ b/library/cpp/monlib/encode/json/CMakeLists.txt @@ -10,6 +10,8 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT AND include(CMakeLists.linux-aarch64.txt) elseif (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAVE_CUDA) include(CMakeLists.linux-x86_64.txt) endif() diff --git a/library/cpp/monlib/encode/json/CMakeLists.windows-x86_64.txt b/library/cpp/monlib/encode/json/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..55a0abe1c3 --- /dev/null +++ b/library/cpp/monlib/encode/json/CMakeLists.windows-x86_64.txt @@ -0,0 +1,23 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(monlib-encode-json) +target_link_libraries(monlib-encode-json PUBLIC + contrib-libs-cxxsupp + yutil + cpp-monlib-encode + monlib-encode-buffered + cpp-monlib-exception + library-cpp-json + cpp-json-writer +) +target_sources(monlib-encode-json PRIVATE + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/json/json_decoder.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/json/json_encoder.cpp +) diff --git a/library/cpp/monlib/encode/legacy_protobuf/protos/CMakeLists.txt b/library/cpp/monlib/encode/legacy_protobuf/protos/CMakeLists.txt index 8f8c04afe5..d90657116d 100644 --- a/library/cpp/monlib/encode/legacy_protobuf/protos/CMakeLists.txt +++ b/library/cpp/monlib/encode/legacy_protobuf/protos/CMakeLists.txt @@ -10,6 +10,8 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT AND include(CMakeLists.linux-aarch64.txt) elseif (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAVE_CUDA) include(CMakeLists.linux-x86_64.txt) endif() diff --git a/library/cpp/monlib/encode/legacy_protobuf/protos/CMakeLists.windows-x86_64.txt b/library/cpp/monlib/encode/legacy_protobuf/protos/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..bce491e67e --- /dev/null +++ b/library/cpp/monlib/encode/legacy_protobuf/protos/CMakeLists.windows-x86_64.txt @@ -0,0 +1,43 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) + +add_library(encode-legacy_protobuf-protos) +target_link_libraries(encode-legacy_protobuf-protos PUBLIC + contrib-libs-cxxsupp + yutil + contrib-libs-protobuf +) +target_proto_messages(encode-legacy_protobuf-protos PRIVATE + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/legacy_protobuf/protos/metric_meta.proto +) +target_proto_addincls(encode-legacy_protobuf-protos + ./ + ${CMAKE_SOURCE_DIR}/ + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src +) +target_proto_outs(encode-legacy_protobuf-protos + --cpp_out=${CMAKE_BINARY_DIR}/ + --cpp_styleguide_out=${CMAKE_BINARY_DIR}/ +) diff --git a/library/cpp/monlib/encode/prometheus/CMakeLists.txt b/library/cpp/monlib/encode/prometheus/CMakeLists.txt index 8f8c04afe5..d90657116d 100644 --- a/library/cpp/monlib/encode/prometheus/CMakeLists.txt +++ b/library/cpp/monlib/encode/prometheus/CMakeLists.txt @@ -10,6 +10,8 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT AND include(CMakeLists.linux-aarch64.txt) elseif (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAVE_CUDA) include(CMakeLists.linux-x86_64.txt) endif() diff --git a/library/cpp/monlib/encode/prometheus/CMakeLists.windows-x86_64.txt b/library/cpp/monlib/encode/prometheus/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..2db649e693 --- /dev/null +++ b/library/cpp/monlib/encode/prometheus/CMakeLists.windows-x86_64.txt @@ -0,0 +1,20 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(monlib-encode-prometheus) +target_link_libraries(monlib-encode-prometheus PUBLIC + contrib-libs-cxxsupp + yutil + cpp-monlib-encode + monlib-encode-buffered +) +target_sources(monlib-encode-prometheus PRIVATE + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp +) diff --git a/library/cpp/monlib/encode/spack/CMakeLists.txt b/library/cpp/monlib/encode/spack/CMakeLists.txt index 8f8c04afe5..d90657116d 100644 --- a/library/cpp/monlib/encode/spack/CMakeLists.txt +++ b/library/cpp/monlib/encode/spack/CMakeLists.txt @@ -10,6 +10,8 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT AND include(CMakeLists.linux-aarch64.txt) elseif (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAVE_CUDA) include(CMakeLists.linux-x86_64.txt) endif() diff --git a/library/cpp/monlib/encode/spack/CMakeLists.windows-x86_64.txt b/library/cpp/monlib/encode/spack/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..9eccd0b629 --- /dev/null +++ b/library/cpp/monlib/encode/spack/CMakeLists.windows-x86_64.txt @@ -0,0 +1,27 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +find_package(ZLIB REQUIRED) + +add_library(monlib-encode-spack) +target_link_libraries(monlib-encode-spack PUBLIC + contrib-libs-cxxsupp + yutil + monlib-encode-buffered + cpp-monlib-exception + contrib-libs-lz4 + contrib-libs-xxhash + ZLIB::ZLIB + contrib-libs-zstd +) +target_sources(monlib-encode-spack PRIVATE + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/spack/spack_v1_decoder.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/spack/spack_v1_encoder.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/spack/varint.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/spack/compression.cpp +) diff --git a/library/cpp/monlib/encode/text/CMakeLists.txt b/library/cpp/monlib/encode/text/CMakeLists.txt index 8f8c04afe5..d90657116d 100644 --- a/library/cpp/monlib/encode/text/CMakeLists.txt +++ b/library/cpp/monlib/encode/text/CMakeLists.txt @@ -10,6 +10,8 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT AND include(CMakeLists.linux-aarch64.txt) elseif (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID AND NOT HAVE_CUDA) include(CMakeLists.linux-x86_64.txt) endif() diff --git a/library/cpp/monlib/encode/text/CMakeLists.windows-x86_64.txt b/library/cpp/monlib/encode/text/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..58143a2371 --- /dev/null +++ b/library/cpp/monlib/encode/text/CMakeLists.windows-x86_64.txt @@ -0,0 +1,18 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(monlib-encode-text) +target_link_libraries(monlib-encode-text PUBLIC + contrib-libs-cxxsupp + yutil + cpp-monlib-encode +) +target_sources(monlib-encode-text PRIVATE + ${CMAKE_SOURCE_DIR}/library/cpp/monlib/encode/text/text_encoder.cpp +) |