- Sidequest: Clean up header-only library dependencies with cmake.

This commit is contained in:
Ian Roddis
2021-08-13 12:43:39 -03:00
parent de8025e0f9
commit 71344b3a2a
12 changed files with 82 additions and 48 deletions

1
utils/CMakeLists.txt Normal file
View File

@@ -0,0 +1 @@
add_subdirectory(rest_server)

View File

@@ -0,0 +1,5 @@
project(rest_server)
file(GLOB SOURCES *.cpp)
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} daggy stdc++fs rapidjson pistache argparse)
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "daggy")

View File

@@ -0,0 +1,23 @@
#include <iostream>
#include <fstream>
#include <argoarse/argparse.hpp>
#include <daggy/Server.hpp>
#include <daggy/executors/task/ForkingTaskExecutor.hpp>
#include <daggy/loggers/dag_run/OStreamLogger.hpp>
int main(int argc, char **argv) {
argparse::ArgumentParser args("Daggy");
args.add_argument("-v", "--verbose");
args.add_argument("-c", "--config")
.help("Config file");
args.add_argument("--ip")
.help("IP address to listen to");
args.add_argument("--port")
.help("Port to listen to")
.action([](const std::string &value) { return std::stoi(value); });
daggy::Server endpoint;
}