generated from Sithas/conan_template
Настроенная сборка
This commit is contained in:
+5
-2
@@ -8,7 +8,6 @@ if (POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 OLD)
|
||||
endif ()
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
|
||||
if (WIN32)
|
||||
@@ -16,7 +15,7 @@ if (WIN32)
|
||||
set(Boost_LIBRARY_DIR "${BOOST_ROOT}/stage/lib")
|
||||
endif ()
|
||||
|
||||
find_package(Boost 1.83.0 REQUIRED COMPONENTS filesystem json log system filesystem url)
|
||||
find_package(Boost 1.88.0 REQUIRED COMPONENTS filesystem json log system url log_setup)
|
||||
if (Boost_FOUND)
|
||||
include_directories(${Boost_INCLUDE_DIR})
|
||||
endif ()
|
||||
@@ -84,6 +83,7 @@ target_link_libraries(App PRIVATE Boost::boost
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::url
|
||||
Boost::log_setup
|
||||
Threads::Threads
|
||||
mysql::concpp)
|
||||
|
||||
@@ -127,6 +127,7 @@ target_link_libraries(AuthRegistrationExecutorTests PRIVATE Boost::boost
|
||||
Boost::log
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::log_setup
|
||||
Threads::Threads
|
||||
mysql::concpp)
|
||||
add_test(AuthRegistrationExecutorTests AuthRegistrationExecutorTests)
|
||||
@@ -153,6 +154,7 @@ target_link_libraries(AuthLoginExecutorTests PRIVATE Boost::boost
|
||||
Boost::log
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::log_setup
|
||||
Threads::Threads
|
||||
mysql::concpp)
|
||||
add_test(AuthLoginExecutorTests AuthLoginExecutorTests)
|
||||
@@ -179,6 +181,7 @@ target_link_libraries(AuthLogoutExecutorTests PRIVATE Boost::boost
|
||||
Boost::log
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::log_setup
|
||||
Threads::Threads
|
||||
mysql::concpp)
|
||||
add_test(AuthLogoutExecutorTests AuthLogoutExecutorTests)
|
||||
|
||||
+11
-5
@@ -3,8 +3,6 @@ FROM ubuntu:24.04
|
||||
ARG CONCPP_VER=9.4.0
|
||||
ARG CONCPP_TGZ=mysql-connector-c++-${CONCPP_VER}-linux-glibc2.28-x86-64bit.tar.gz
|
||||
|
||||
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates curl xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -24,9 +22,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Boost install
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libboost-all-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN curl -L --retry 5 --retry-all-errors -o /tmp/boost.tar.gz "https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.gz" \
|
||||
&& ls -lh /tmp/boost.tar.gz \
|
||||
&& tar -tzf /tmp/boost.tar.gz >/dev/null
|
||||
|
||||
RUN mkdir -p /tmp/boost-src \
|
||||
&& tar -xzf /tmp/boost.tar.gz -C /tmp/boost-src --strip-components=1 \
|
||||
&& cd /tmp/boost-src \
|
||||
&& ./bootstrap.sh --prefix=/usr/local
|
||||
|
||||
RUN cd /tmp/boost-src \
|
||||
&& ./b2 -j"$(nproc)" install
|
||||
|
||||
# Project copy
|
||||
WORKDIR /project
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "./../DAO/IDiariesDao.h"
|
||||
#include "./../DAO/IDiariesDAO.h"
|
||||
#include "./../db/mysql_connector.h"
|
||||
|
||||
namespace uad
|
||||
|
||||
@@ -4,7 +4,7 @@ using namespace std;
|
||||
|
||||
namespace uad
|
||||
{
|
||||
char const* session_exception::what() const
|
||||
char const* session_exception::what() const noexcept
|
||||
{
|
||||
return message.c_str();
|
||||
}
|
||||
|
||||
@@ -15,6 +15,6 @@ struct session_exception : std::exception
|
||||
session_exception(const boost::beast::http::status ec, const std::string info)
|
||||
: code(ec), comment(info), message(std::to_string(static_cast<uint64_t>(ec)) + " - " + comment)
|
||||
{}
|
||||
char const* what() const override;
|
||||
[[nodiscard]] char const* what() const noexcept override;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/log/utility/setup/file.hpp>
|
||||
#include <boost/log/utility/setup/common_attributes.hpp>
|
||||
|
||||
@@ -51,12 +51,12 @@ BOOST_AUTO_TEST_CASE(Should_Be_Initiated_With_Unordered_Map_HTTP_Methods_To_Exec
|
||||
{
|
||||
IControllerMock::HTTPMethodsToExecutors executors;
|
||||
|
||||
executors[beast::http::verb::get] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::post] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::put] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::delete_] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::head] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::options] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::get] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::post] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::put] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::delete_] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::head] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::options] = std::make_shared<MockExecutor>();
|
||||
|
||||
IControllerMock my_controller(std::move(executors));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user