stabilizec CMake
This commit is contained in:
parent
b2f0a8d4c3
commit
dd8721e96a
@ -8,12 +8,9 @@ set(Boost_USE_MULTITHREADED ON)
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:/Users/Public/Libraries/boost_1_84_0")
|
||||
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:/Users/Public/Libraries/boost_1_84_0/stage/lib")
|
||||
|
||||
#include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
# conan_basic_setup()
|
||||
|
||||
find_package(Boost 1.78.0 REQUIRED)
|
||||
find_package(Boost 1.78.0 REQUIRED COMPONENTS filesystem json)
|
||||
if (Boost_FOUND)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
include_directories(${Boost_INCLUDE_DIR})
|
||||
endif ()
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
@ -32,4 +29,5 @@ add_executable(hello_async
|
||||
src/listener.h
|
||||
src/listener.cpp
|
||||
src/sdk.h)
|
||||
target_link_libraries(hello_async PRIVATE Threads::Threads)
|
||||
target_include_directories(hello_async PUBLIC ${Boost_INCLUDE_DIR})
|
||||
target_link_libraries(hello_async PRIVATE Threads::Threads Boost::filesystem Boost::json)
|
||||
|
7
main.cpp
7
main.cpp
@ -1,5 +1,7 @@
|
||||
#include "src/sdk.h"
|
||||
//
|
||||
#include <boost/json.hpp>
|
||||
#include <boost/json/src.hpp>
|
||||
#include <boost/asio/signal_set.hpp>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
@ -14,6 +16,7 @@ namespace
|
||||
namespace net = boost::asio;
|
||||
using namespace std::literals;
|
||||
namespace sys = boost::system;
|
||||
namespace json = boost::json;
|
||||
namespace http = boost::beast::http;
|
||||
using namespace std;
|
||||
using net::ip::tcp;
|
||||
@ -50,7 +53,9 @@ StringResponse HandleRequest(StringRequest&& req)
|
||||
config += buf;
|
||||
}
|
||||
|
||||
auto r = config;
|
||||
string_view config_ref {config.begin(), config.end()};
|
||||
|
||||
auto parsed_config = json::parse(config_ref);
|
||||
}
|
||||
else if (equal(k_MapsPattern.begin(),
|
||||
k_MapsPattern.end(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user