# Create executable

add_executable(doct-cpp src/main.cpp)

target_link_libraries(doct-cpp LINK_PRIVATE doct-cpp-lib)

 

# Compile DOCT files into library

add_library(doct-cpp-lib

    src/task_result.cpp

    src/flow_runner.cpp

    src/collector_task_runner.cpp

    src/tweaker_task_runner.cpp

    src/result_logger.cpp

    src/data/collector_task.cpp

    src/data/tweaker_task.cpp

    src/data/flow.cpp

    src/data/sysinfo_task.cpp

    src/systeminfo_task_runner.cpp

)

target_link_libraries(doct-cpp-lib LINK_PUBLIC ext_tools)

target_include_directories(doct-cpp-lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)

target_include_directories(doct-cpp-lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/data)

 

# Create test binary

add_executable(doct-cpp_tests

    test/collector_task_runner_tests.cpp

    test/flow_tests.cpp

)

target_link_libraries(doct-cpp_tests ${CONAN_LIBS} doct-cpp-lib)

gtest_discover_tests(doct-cpp_tests)