- Sidequest: Clean up header-only library dependencies with cmake.
This commit is contained in:
1
utils/CMakeLists.txt
Normal file
1
utils/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
add_subdirectory(rest_server)
|
||||
5
utils/rest_server/CMakeLists.txt
Normal file
5
utils/rest_server/CMakeLists.txt
Normal 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")
|
||||
23
utils/rest_server/daggy.cpp
Normal file
23
utils/rest_server/daggy.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user