cmake_minimum_required(VERSION 3.12)
project(code)
include(ExternalProject)

find_package (Threads)
set(EXECUTABLE_OUTPUT_PATH "bin")


set(CMAKE_CXX_STANDARD 17)
set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external)

add_subdirectory(external/fmtlib)
add_subdirectory(external/gflags)
add_subdirectory(external/spdlog)

add_executable(code main.cpp protocol/Request.cpp protocol/Request.h protocol/Response.cpp protocol/Response.h executor/threaded/ThreadedExecutor.cpp executor/threaded/ThreadedExecutor.h executor/shared/Socket.cpp executor/shared/Socket.h executor/TestExecutor.cpp executor/TestExecutor.h logger/Tracer.cpp logger/Tracer.h executor/select/SelectExecutor.cpp executor/select/SelectExecutor.h executor/poll/PollExecutor.cpp executor/poll/PollExecutor.h executor/epoll/EPollExecutor.cpp executor/epoll/EPollExecutor.h)
target_link_libraries (code ${CMAKE_THREAD_LIBS_INIT} fmt gflags::gflags spdlog)

