diff --git a/.clang_complete b/.clang_complete index 7deaa8a3dabc..35588f4e7e13 100644 --- a/.clang_complete +++ b/.clang_complete @@ -1,2 +1,2 @@ --std=gnu++17 +-std=c++17 -Isrc diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000000..ed9d0ba65b88 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,141 @@ +cmake_minimum_required(VERSION 3.9.0) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +project(REDPANDA VERSION "0.1.0" LANGUAGES CXX) +# https://cmake.org/cmake/help/v3.4/policy/CMP0065.html +cmake_policy(SET CMP0065 OLD) + +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS 1) + +# CCACHE_DIR is initially provided by vtools +set(CCACHE_DIR $ENV{CCACHE_DIR} CACHE PATH "ccache directory") +set(ENV{CCACHE_DIR} ${CCACHE_DIR}) +set(REDPANDA_DEPS_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps_install + CACHE STRING "Managed dependencies install directory") +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +list(APPEND BASE_LD_FLAGS_LIST + -L${REDPANDA_DEPS_INSTALL_DIR}/lib + -L${REDPANDA_DEPS_INSTALL_DIR}/lib64 + ) +set(PKG_CONFIG_PATH_LIST + ${REDPANDA_DEPS_INSTALL_DIR}/lib64/pkgconfig + ${REDPANDA_DEPS_INSTALL_DIR}/share/pkgconfig + ${REDPANDA_DEPS_INSTALL_DIR}/lib/pkgconfig + ) + +list(APPEND BASE_CXX_FLAGS_LIST -fPIC) +list(APPEND BASE_C_FLAGS_LIST -fPIC) +if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") + list(APPEND BASE_CXX_FLAGS_LIST + -fsanitize=undefined + -fsanitize=address + ) + list(APPEND BASE_C_FLAGS_LIST + -fsanitize=undefined + -fsanitize=address + ) + list(APPEND BASE_LD_FLAGS_LIST + -fsanitize=undefined + -fsanitize=address + ) +endif() + +# join flag lists +string(JOIN " " BASE_C_FLAGS ${BASE_C_FLAGS_LIST}) +string(JOIN " " BASE_CXX_FLAGS ${BASE_CXX_FLAGS_LIST}) +string(JOIN " " BASE_LD_FLAGS ${BASE_LD_FLAGS_LIST}) +string(JOIN ":" PKG_CONFIG_PATH ${PKG_CONFIG_PATH_LIST}) +find_package(PkgConfig REQUIRED) +set(ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BASE_CXX_FLAGS}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BASE_C_FLAGS}") + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING + "Choose: Debug, Release, RelWithDebInfo, MinSizeRel." FORCE) +endif() + +if(REDPANDA_DEPS_ONLY AND NOT V_MANAGE_DEPS) + message(FATAL_ERROR + "To build managed dependencies V_MANAGE_DEPS must be enabled") +endif() + +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${BASE_LD_FLAGS} -pie") +set(CMAKE_SHARED_LINKER_FLAGS "${BASE_LD_FLAGS}") +set(CMAKE_MODULE_LINKER_FLAGS "${BASE_LD_FLAGS}") + +# don't export() the contents to registry +set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON CACHE INTERNAL "" FORCE) +# disable system level registry /usr/local/share/cmake/* +set(CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY ON CACHE INTERNAL "" FORCE) +# disable user package registry ~/.cmake/* +set(CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY ON CACHE INTERNAL "" FORCE) +set(REDPANDA_DEPS_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps_build) +# build type specific flags +string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE) +set(CMAKE_C_FLAGS_BUILD_TYPE ${CMAKE_C_FLAGS_${BUILD_TYPE}}) +set(CMAKE_CXX_FLAGS_BUILD_TYPE ${CMAKE_CXX_FLAGS_${BUILD_TYPE}}) +configure_file(oss.cmake.in ${REDPANDA_DEPS_BUILD_DIR}/CMakeLists.txt @ONLY) +# wire up dependency search paths. +list(APPEND CMAKE_PREFIX_PATH "${REDPANDA_DEPS_INSTALL_DIR}") +set(BASE_LD_FLAGS "${BASE_LD_FLAGS} -L${REDPANDA_DEPS_INSTALL_DIR}/lib") +if(NOT REDPANDA_DEPS_SKIP_BUILD) + execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + RESULT_VARIABLE result + WORKING_DIRECTORY ${REDPANDA_DEPS_BUILD_DIR}) + if(result) + message(FATAL_ERROR "CMake step for v::deps failed: ${result}") + endif() + execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${REDPANDA_DEPS_BUILD_DIR}) + if(result) + message(FATAL_ERROR "Build step for v::build failed: ${result}") + endif() +endif() + +# from seastar/CMakeLists.txt. unfortunately this snippet doesn't appear to be +# installed along with the rest of seastar. +function (seastar_generate_swagger) + set (one_value_args TARGET VAR IN_FILE OUT_FILE) + cmake_parse_arguments (args "" "${one_value_args}" "" ${ARGN}) + get_filename_component (out_dir ${args_OUT_FILE} DIRECTORY) + if(REDPANDA_DEPS_ONLY) + set (generator "${REDPANDA_DEPS_INSTALL_DIR}/bin/seastar-json2code.py") + else() + find_program(GENERATOR "seastar-json2code.py") + set (generator "${GENERATOR}") + endif() + + add_custom_command ( + DEPENDS + ${args_IN_FILE} + ${generator} + OUTPUT ${args_OUT_FILE} + COMMAND ${CMAKE_COMMAND} -E make_directory ${out_dir} + COMMAND ${generator} -f ${args_IN_FILE} -o ${args_OUT_FILE}) + + add_custom_target (${args_TARGET} + DEPENDS ${args_OUT_FILE}) + + set (${args_VAR} ${args_OUT_FILE} PARENT_SCOPE) +endfunction () + +if(REDPANDA_DEPS_ONLY) + message("Finished building/installing external project dependencies.") + return() +endif() + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +# add code +include(ccache) +include(testing) +include(set_option) +include(v_library) +add_subdirectory(src) diff --git a/README.md b/README.md index 6b24a3d04e0a..b1bd49f0bb9a 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ all built from source. The only thing we do not build yet is the Linux Kernel, b For hackers, here is the short and sweet: ``` -./install-dependencies.sh && ./build.sh +sudo ./install-dependencies.sh && ./build.sh ``` See the [contributing docs](./CONTRIBUTING.md) diff --git a/build.sh b/build.sh new file mode 100755 index 000000000000..c2eb16390c6a --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -x +root=$(git rev-parse --show-toplevel) +if [[ -z ${CC} ]]; then export CC=/usr/bin/gcc; fi +if [[ -z ${CXX} ]]; then export CXX=/usr/bin/g++; fi +if [[ ! -z ${CCACHE_DIR} && -e /dev/shm ]]; then export CCACHE_DIR=/dev/shm/redpanda; fi + +# Change Debug via -DCMAKE_BUILD_TYPE=Debug +cmake -DCMAKE_BUILD_TYPE=Release \ + -B$root/build \ + -H$root \ + -GNinja \ + -DCMAKE_C_COMPILER=$CC \ + -DCMAKE_CXX_COMPILER=$CXX + +(cd $root/build && ninja && ctest -R _rpunit) diff --git a/cmake/FindBase64.cmake b/cmake/FindBase64.cmake index 1699115fb55d..4cf12e771b46 100644 --- a/cmake/FindBase64.cmake +++ b/cmake/FindBase64.cmake @@ -2,13 +2,11 @@ include (FindPackageHandleStandardArgs REQUIRED) find_path (Base64_IMPORTED_OBJECT NAMES libbase64.o - HINTS - ${V_DEPS_INSTALL_DIR}/lib) - + HINTS ${REDPANDA_DEPS_INSTALL_DIR}/lib) + find_path (Base64_INCLUDE_DIR NAMES libbase64.h - HINTS - ${V_DEPS_INSTALL_DIR}/include) + HINTS ${REDPANDA_DEPS_INSTALL_DIR}/include) mark_as_advanced ( Base64_IMPORTED_OBJECT @@ -23,9 +21,9 @@ if (Base64_FOUND) set (Base64_INCLUDE_DIRS ${Base64_INCLUDE_DIR}) endif () -if (Base64_FOUND AND NOT (TARGET Zstd::zstd)) - add_library(Base64 OBJECT IMPORTED) - set_target_properties(Base64 +if (Base64_FOUND AND NOT (TARGET Base64::base64)) + add_library(Base64::base64 OBJECT IMPORTED) + set_target_properties(Base64::base64 PROPERTIES IMPORTED_OBJECTS ${Base64_IMPORTED_OBJECT}/libbase64.o INTERFACE_INCLUDE_DIRECTORIES ${Base64_INCLUDE_DIR}) diff --git a/install-dependencies.sh b/install-dependencies.sh new file mode 100755 index 000000000000..141dcb285bfe --- /dev/null +++ b/install-dependencies.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +echo "installing seastar dependencies" +if [ -f "/etc/os-release" ]; then + . /etc/os-release +elif [ -f "/etc/arch-release" ]; then + export ID=arch +else + echo "/etc/os-release missing." + exit 1 +fi + +deb_deps=( + curl + libzstd-dev + libsnappy-dev + libsystemd-dev + rapidjson-dev + libxxhash-dev + python3-venv + python3-jinja2 +) +fedora_deps=( + curl + libzstd-static + libzstd-devel + snappy-devel + systemd-devel + rapidjson-devel + xxhash-devel + python3-virtualenv + python3-jinja2 +) + + +case "$ID" in + ubuntu|debian) + apt-get install -y "${deb_deps[@]}" + ;; + fedora) + dnf install -y "${fedora_deps[@]}" + ;; + *) + echo "Please help us make the script better by sending patches with your OS $ID" + exit 1 + ;; +esac +# needed for unit tests +sudo sysctl -w fs.aio-max-nr=10485760 +curl -1sLf "https://raw.githubusercontent.com/vectorizedio/seastar/master/install-dependencies.sh" | sudo -E bash diff --git a/oss.cmake.in b/oss.cmake.in new file mode 100644 index 000000000000..e4f5d6ea6370 --- /dev/null +++ b/oss.cmake.in @@ -0,0 +1,204 @@ +cmake_minimum_required(VERSION 3.9.0) +project(build-deps NONE) +cmake_host_system_information( + RESULT build_concurrency_factor + QUERY NUMBER_OF_LOGICAL_CORES) +set(info_dir --infodir=@REDPANDA_DEPS_INSTALL_DIR@/share/info) +include(ExternalProject) + +set(c_flags "@BASE_C_FLAGS@ @CMAKE_C_FLAGS_BUILD_TYPE@") +set(cxx_flags "@BASE_CXX_FLAGS@ @CMAKE_CXX_FLAGS_BUILD_TYPE@ -std=c++17") +set(ld_flags "@BASE_LD_FLAGS@") +set(default_depends "") + +set(common_cmake_args + -DCMAKE_CXX_STANDARD=@CMAKE_CXX_STANDARD@ + -DCMAKE_CXX_EXTENSIONS=@CMAKE_CXX_EXTENSIONS@ + -DCMAKE_C_COMPILER=@CMAKE_C_COMPILER@ + -DCMAKE_CXX_COMPILER=@CMAKE_CXX_COMPILER@ + "-DCMAKE_C_FLAGS=@BASE_C_FLAGS@" + "-DCMAKE_C_FLAGS_@BUILD_TYPE@=@CMAKE_C_FLAGS_BUILD_TYPE@" + "-DCMAKE_CXX_FLAGS=@BASE_CXX_FLAGS@ -std=c++17" + "-DCMAKE_CXX_FLAGS_@BUILD_TYPE@=@CMAKE_CXX_FLAGS_BUILD_TYPE@" + "-DCMAKE_EXE_LINKER_FLAGS=@CMAKE_EXE_LINKER_FLAGS@" + "-DCMAKE_SHARED_LINKER_FLAGS=@CMAKE_SHARED_LINKER_FLAGS@" + "-DCMAKE_MODULE_LINKER_FLAGS=@CMAKE_MODULE_LINKER_FLAGS@" + -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ + -DCMAKE_PREFIX_PATH=@REDPANDA_DEPS_INSTALL_DIR@ + -DCMAKE_INSTALL_PREFIX=@REDPANDA_DEPS_INSTALL_DIR@ + -DCMAKE_INSTALL_RPATH=@REDPANDA_DEPS_INSTALL_DIR@/lib + -DCMAKE_SKIP_BUILD_RPATH=OFF + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + -DCMAKE_POSITION_INDEPENDENT_CODE=@CMAKE_POSITION_INDEPENDENT_CODE@ + -DCMAKE_VERBOSE_MAKEFILE=@CMAKE_VERBOSE_MAKEFILE@ +) +# pkgconfig +set(ENV{PKG_CONFIG_PATH} @PKG_CONFIG_PATH@) +set(cmake_build_env) +if (@CMAKE_CXX_COMPILER_ID@ MATCHES "GNU") + set(seastar_ld_flags "${ld_flags} -pthread") +endif() + +# autotools +set(base_env + CC=@CMAKE_C_COMPILER@ + CXX=@CMAKE_CXX_COMPILER@ + PKG_CONFIG_PATH=@PKG_CONFIG_PATH@ +) +set(configure_env + ${base_env} + CFLAGS=${c_flags} + CXXFLAGS=${cxx_flags} + LDFLAGS=${ld_flags} +) +# For a libtool project +set(build_env + ${base_env} + CFLAGS=${c_flags} + CXXFLAGS=${cxx_flags} + "LDFLAGS=${ld_flags}" +) +# define make command in terms of cmake +set(make_command make ${build_env} -j${build_concurrency_factor} ) +ExternalProject_Add(seastar + GIT_REPOSITORY https://github.com/vectorizedio/seastar.git + GIT_TAG 92c639117d9f32f0b5f23b05b1ca14c39e1df8a7 + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + CMAKE_COMMAND ${CMAKE_COMMAND} -E env ${cmake_build_env} ${CMAKE_COMMAND} + CMAKE_ARGS + ${common_cmake_args} + -DProtobuf_USE_STATIC_LIBS=ON + -DSeastar_INSTALL=ON + -DSeastar_DPDK=OFF + -DSeastar_APPS=OFF + -DSeastar_DEMOS=OFF + -DSeastar_DOCS=OFF + -DSeastar_TESTING=OFF + -DSeastar_CXX_FLAGS=-Wno-error + "-DSeastar_LD_FLAGS=${seastar_ld_flags}" + -DSeastar_API_LEVEL=6 + -DSeastar_CXX_DIALECT=c++17 + -DSeastar_UNUSED_RESULT_ERROR=ON + INSTALL_COMMAND ${CMAKE_COMMAND} --build --target install + DEPENDS ${default_depends}) + +ExternalProject_Add(HdrHistogram + URL https://storage.googleapis.com/vectorizedio-public/dependencies/HdrHistogram_c-0.11.2.tar.gz + URL_MD5 95970dea64f1a7a8d199aeb9f7c15e60 + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + CMAKE_COMMAND ${CMAKE_COMMAND} -E env ${cmake_build_env} ${CMAKE_COMMAND} + CMAKE_ARGS + ${common_cmake_args} + -DHDR_HISTOGRAM_BUILD_PROGRAMS=OFF + -DHDR_HISTOGRAM_BUILD_SHARED=OFF + DEPENDS ${default_depends}) + +ExternalProject_Add(abseil + GIT_REPOSITORY https://github.com/vectorizedio/abseil-cpp.git + GIT_TAG bcefbdcd + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + CMAKE_COMMAND ${CMAKE_COMMAND} -E env ${cmake_build_env} ${CMAKE_COMMAND} + DEPENDS ${default_depends} + CMAKE_ARGS + ${common_cmake_args} + -DABSL_ENABLE_INSTALL=ON) + +ExternalProject_Add(crc32c + GIT_REPOSITORY https://github.com/vectorizedio/crc32c.git + GIT_TAG 47b40d220949c5b013d49c1179643334196ec5a9 + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + CMAKE_COMMAND ${CMAKE_COMMAND} -E env ${cmake_build_env} ${CMAKE_COMMAND} + DEPENDS ${default_depends} + CMAKE_ARGS + ${common_cmake_args} + -DCRC32C_BUILD_TESTS=0 + -DCRC32C_BUILD_BENCHMARKS=0 + -DCRC32C_USE_GLOG=0) + +ExternalProject_Add(roaring + GIT_REPOSITORY https://github.com/vectorizedio/CRoaring.git + GIT_TAG 7b9c83740d4f764941d38144cc8e2122076e38e4 + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + DEPENDS ${default_depends} + CMAKE_COMMAND ${CMAKE_COMMAND} -E env ${cmake_build_env} ${CMAKE_COMMAND} + CMAKE_ARGS + ${common_cmake_args} + -DENABLE_ROARING_TESTS=OFF + -DROARING_BUILD_STATIC=ON) + +ExternalProject_Add(alien_thread + GIT_REPOSITORY https://github.com/vectorizedio/alien_thread.git + GIT_TAG bdfb56f + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + DEPENDS ${default_depends} + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND + COMMAND ${CMAKE_COMMAND} -E copy_directory /include/v /include/v) + +ExternalProject_Add(librdkafka + GIT_REPOSITORY https://github.com/edenhill/librdkafka + GIT_TAG v1.2.2 + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + DEPENDS ${default_depends} + CMAKE_COMMAND ${CMAKE_COMMAND} -E env ${cmake_build_env} ${CMAKE_COMMAND} + CMAKE_ARGS + ${common_cmake_args} + -DWITH_ZLIB=OFF + -DWITH_ZSTD=OFF + -DENABLE_LZ4_EXT=OFF + -DRDKAFKA_BUILD_STATIC=ON + -DRDKAFKA_BUILD_EXAMPLES=OFF + -DRDKAFKA_BUILD_TESTS=OFF) + +ExternalProject_Add(cppkafka + GIT_REPOSITORY https://github.com/mfontanini/cppkafka.git + GIT_TAG c3b4580 + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + DEPENDS librdkafka + CMAKE_COMMAND ${CMAKE_COMMAND} -E env ${cmake_build_env} ${CMAKE_COMMAND} + CMAKE_ARGS + ${common_cmake_args} + -DCPPKAFKA_BUILD_SHARED=OFF + -DCPPKAFKA_RDKAFKA_STATIC_LIB=ON + -DCPPKAFKA_BOOST_STATIC_LIBS=OFF + -DCPPKAFKA_DISABLE_EXAMPLES=OFF + -DCPPKAFKA_DISABLE_TESTS=OFF) + +ExternalProject_Add(base64_ext + GIT_REPOSITORY https://github.com/vectorizedio/base64 + GIT_TAG eaebee8 + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + DEPENDS ${default_depends} + CONFIGURE_COMMAND "" + BUILD_COMMAND + ${CMAKE_COMMAND} -E env ${build_env} + make ${build_env} lib/libbase64.o -j${build_concurrency_factor} + BUILD_IN_SOURCE true + INSTALL_COMMAND + COMMAND ${CMAKE_COMMAND} -E copy /include/libbase64.h /include/libbase64.h + COMMAND ${CMAKE_COMMAND} -E copy /lib/libbase64.o /lib/libbase64.o) + +ExternalProject_Add(kafka-codegen-pex + DOWNLOAD_COMMAND "" + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND + COMMAND ${CMAKE_COMMAND} -E chdir python3 -m venv env + COMMAND /env/bin/pip install pex + COMMAND /env/bin/pex jsonschema jinja2 -o /bin/kafka-codegen-venv) + +ExternalProject_Add(kafka-python-pex + DOWNLOAD_COMMAND "" + INSTALL_DIR @REDPANDA_DEPS_INSTALL_DIR@ + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND + COMMAND ${CMAKE_COMMAND} -E chdir python3 -m venv env + COMMAND /env/bin/pip install pex + COMMAND /env/bin/pex kafka-python -o /bin/kafka-python-env + ) diff --git a/src/v/pandaproxy/CMakeLists.txt b/src/v/pandaproxy/CMakeLists.txt index 95a94db668e2..7d3744d9b130 100644 --- a/src/v/pandaproxy/CMakeLists.txt +++ b/src/v/pandaproxy/CMakeLists.txt @@ -28,7 +28,7 @@ seastar_generate_swagger( OUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/api/api-doc/post_topics_name.json.h ) -find_package(Base64) +find_package(Base64 REQUIRED) v_cc_library( NAME rest_application @@ -40,7 +40,7 @@ v_cc_library( probe.cc proxy.cc server.cc - $ + $ DEPS v::pandaproxy_client v::syschecks diff --git a/src/v/pandaproxy/json/rjson_util.h b/src/v/pandaproxy/json/rjson_util.h index e33bf389289e..6e6d60dd364c 100644 --- a/src/v/pandaproxy/json/rjson_util.h +++ b/src/v/pandaproxy/json/rjson_util.h @@ -33,7 +33,7 @@ ss::sstring rjson_serialize(const T& v) { using ::pandaproxy::json::rjson_serialize; rjson_serialize(wrt, v); - return {str_buf.GetString(), str_buf.GetLength()}; + return ss::sstring(str_buf.GetString(), str_buf.GetSize()); } template diff --git a/src/v/utils/tests/CMakeLists.txt b/src/v/utils/tests/CMakeLists.txt index 648c361859a6..141d4ec6c614 100644 --- a/src/v/utils/tests/CMakeLists.txt +++ b/src/v/utils/tests/CMakeLists.txt @@ -26,7 +26,7 @@ rp_test( BINARY_NAME named_type_test SOURCES named_type_tests.cc DEFINITIONS BOOST_TEST_DYN_LINK - LIBRARIES Boost::unit_test_framework + LIBRARIES Boost::unit_test_framework v::utils ) rp_test( UNIT_TEST @@ -35,12 +35,12 @@ rp_test( DEFINITIONS BOOST_TEST_DYN_LINK LIBRARIES Boost::unit_test_framework ) - rp_test( - UNIT_TEST - BINARY_NAME retry_test - SOURCES retry_test.cc - LIBRARIES v::seastar_testing_main - ARGS "-- -c 2" +rp_test( + UNIT_TEST + BINARY_NAME retry_test + SOURCES retry_test.cc + LIBRARIES v::seastar_testing_main + ARGS "-- -c 2" ) rp_test( @@ -69,4 +69,4 @@ rp_test( BINARY_NAME state_crc_file_test SOURCES state_crc_file_test.cc LIBRARIES v::seastar_testing_main v::utils -) \ No newline at end of file +)