From 8a8822740e816f4d216a2f3d916539a988b401c5 Mon Sep 17 00:00:00 2001 From: Anton Zhilin Date: Thu, 28 Dec 2023 17:22:46 +0300 Subject: [PATCH 1/2] feat cmake: up userver --- CMakeLists.txt | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5972d0..0bead3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,6 @@ cmake_minimum_required(VERSION 3.12) project(service_template CXX) -# Disable userver libraries that are not needed in this project -set(USERVER_FEATURE_MONGODB OFF CACHE BOOL "" FORCE) -set(USERVER_FEATURE_POSTGRESQL OFF CACHE BOOL "" FORCE) -set(USERVER_FEATURE_REDIS OFF CACHE BOOL "" FORCE) -set(USERVER_FEATURE_CLICKHOUSE OFF CACHE BOOL "" FORCE) -set(USERVER_FEATURE_GRPC OFF CACHE BOOL "" FORCE) -set(USERVER_FEATURE_RABBITMQ OFF CACHE BOOL "" FORCE) - # Compatibility mode: some systems don't support these features set(USERVER_FEATURE_CRYPTOPP_BLAKE2 OFF CACHE BOOL "" FORCE) set(USERVER_FEATURE_GRPC_CHANNELZ OFF CACHE BOOL "" FORCE) @@ -16,9 +8,8 @@ set(USERVER_FEATURE_REDIS_HI_MALLOC ON CACHE BOOL "" FORCE) # Adding userver dependency -include(third_party/userver/cmake/SetupEnvironment.cmake) -include(GNUInstallDirs) add_subdirectory(third_party/userver) +userver_setup_environment() # Common sources @@ -57,6 +48,8 @@ userver_testsuite_add_simple() # Install +include(GNUInstallDirs) + if(DEFINED ENV{PREFIX}) message(STATUS "Set install prefix: $ENV{PREFIX}") file(TO_CMAKE_PATH "$ENV{PREFIX}" PREFIX_PATH) From 13c74ae34515ce6cbc33e6fbb2b36077cd887233 Mon Sep 17 00:00:00 2001 From: Anton Zhilin Date: Thu, 28 Dec 2023 17:24:31 +0300 Subject: [PATCH 2/2] Fix --- third_party/userver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/userver b/third_party/userver index b65445d..320656f 160000 --- a/third_party/userver +++ b/third_party/userver @@ -1 +1 @@ -Subproject commit b65445d20df6a3814c84dc4d85836e7ed7d04f81 +Subproject commit 320656f015cef1a0e91a714dcb41aa543c97631f