generated from Sithas/conan_template
Настроенная сборка
This commit is contained in:
+5
-2
@@ -8,7 +8,6 @@ if (POLICY CMP0167)
|
|||||||
cmake_policy(SET CMP0167 OLD)
|
cmake_policy(SET CMP0167 OLD)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
|
||||||
set(Boost_USE_MULTITHREADED ON)
|
set(Boost_USE_MULTITHREADED ON)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@@ -16,7 +15,7 @@ if (WIN32)
|
|||||||
set(Boost_LIBRARY_DIR "${BOOST_ROOT}/stage/lib")
|
set(Boost_LIBRARY_DIR "${BOOST_ROOT}/stage/lib")
|
||||||
endif ()
|
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)
|
if (Boost_FOUND)
|
||||||
include_directories(${Boost_INCLUDE_DIR})
|
include_directories(${Boost_INCLUDE_DIR})
|
||||||
endif ()
|
endif ()
|
||||||
@@ -84,6 +83,7 @@ target_link_libraries(App PRIVATE Boost::boost
|
|||||||
Boost::system
|
Boost::system
|
||||||
Boost::filesystem
|
Boost::filesystem
|
||||||
Boost::url
|
Boost::url
|
||||||
|
Boost::log_setup
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
mysql::concpp)
|
mysql::concpp)
|
||||||
|
|
||||||
@@ -127,6 +127,7 @@ target_link_libraries(AuthRegistrationExecutorTests PRIVATE Boost::boost
|
|||||||
Boost::log
|
Boost::log
|
||||||
Boost::system
|
Boost::system
|
||||||
Boost::filesystem
|
Boost::filesystem
|
||||||
|
Boost::log_setup
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
mysql::concpp)
|
mysql::concpp)
|
||||||
add_test(AuthRegistrationExecutorTests AuthRegistrationExecutorTests)
|
add_test(AuthRegistrationExecutorTests AuthRegistrationExecutorTests)
|
||||||
@@ -153,6 +154,7 @@ target_link_libraries(AuthLoginExecutorTests PRIVATE Boost::boost
|
|||||||
Boost::log
|
Boost::log
|
||||||
Boost::system
|
Boost::system
|
||||||
Boost::filesystem
|
Boost::filesystem
|
||||||
|
Boost::log_setup
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
mysql::concpp)
|
mysql::concpp)
|
||||||
add_test(AuthLoginExecutorTests AuthLoginExecutorTests)
|
add_test(AuthLoginExecutorTests AuthLoginExecutorTests)
|
||||||
@@ -179,6 +181,7 @@ target_link_libraries(AuthLogoutExecutorTests PRIVATE Boost::boost
|
|||||||
Boost::log
|
Boost::log
|
||||||
Boost::system
|
Boost::system
|
||||||
Boost::filesystem
|
Boost::filesystem
|
||||||
|
Boost::log_setup
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
mysql::concpp)
|
mysql::concpp)
|
||||||
add_test(AuthLogoutExecutorTests AuthLogoutExecutorTests)
|
add_test(AuthLogoutExecutorTests AuthLogoutExecutorTests)
|
||||||
|
|||||||
+11
-5
@@ -3,8 +3,6 @@ FROM ubuntu:24.04
|
|||||||
ARG CONCPP_VER=9.4.0
|
ARG CONCPP_VER=9.4.0
|
||||||
ARG CONCPP_TGZ=mysql-connector-c++-${CONCPP_VER}-linux-glibc2.28-x86-64bit.tar.gz
|
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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates curl xz-utils \
|
ca-certificates curl xz-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& 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/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Boost install
|
# Boost install
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
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" \
|
||||||
libboost-all-dev \
|
&& ls -lh /tmp/boost.tar.gz \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& 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
|
# Project copy
|
||||||
WORKDIR /project
|
WORKDIR /project
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "./../DAO/IDiariesDao.h"
|
#include "./../DAO/IDiariesDAO.h"
|
||||||
#include "./../db/mysql_connector.h"
|
#include "./../db/mysql_connector.h"
|
||||||
|
|
||||||
namespace uad
|
namespace uad
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using namespace std;
|
|||||||
|
|
||||||
namespace uad
|
namespace uad
|
||||||
{
|
{
|
||||||
char const* session_exception::what() const
|
char const* session_exception::what() const noexcept
|
||||||
{
|
{
|
||||||
return message.c_str();
|
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)
|
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)
|
: 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/trivial.hpp>
|
||||||
#include <boost/log/utility/setup/file.hpp>
|
#include <boost/log/utility/setup/file.hpp>
|
||||||
#include <boost/log/utility/setup/common_attributes.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;
|
IControllerMock::HTTPMethodsToExecutors executors;
|
||||||
|
|
||||||
executors[beast::http::verb::get] = make_shared<MockExecutor>();
|
executors[beast::http::verb::get] = std::make_shared<MockExecutor>();
|
||||||
executors[beast::http::verb::post] = make_shared<MockExecutor>();
|
executors[beast::http::verb::post] = std::make_shared<MockExecutor>();
|
||||||
executors[beast::http::verb::put] = make_shared<MockExecutor>();
|
executors[beast::http::verb::put] = std::make_shared<MockExecutor>();
|
||||||
executors[beast::http::verb::delete_] = make_shared<MockExecutor>();
|
executors[beast::http::verb::delete_] = std::make_shared<MockExecutor>();
|
||||||
executors[beast::http::verb::head] = make_shared<MockExecutor>();
|
executors[beast::http::verb::head] = std::make_shared<MockExecutor>();
|
||||||
executors[beast::http::verb::options] = make_shared<MockExecutor>();
|
executors[beast::http::verb::options] = std::make_shared<MockExecutor>();
|
||||||
|
|
||||||
IControllerMock my_controller(std::move(executors));
|
IControllerMock my_controller(std::move(executors));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user