ADD: add a simple working version of a pod controler class
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||
project (Ship VERSION 0.1.0 LANGUAGES CXX C)
|
||||
project (kubecontrol VERSION 0.1.0 LANGUAGES CXX C)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
include(defaultOptions)
|
||||
|
||||
@@ -19,6 +19,11 @@ IF(NOT TARGET Catch2)
|
||||
set(CLI11_TESTING OFF CACHE BOOL "disable testing")
|
||||
add_subdirectory(libs/CLI11 EXCLUDE_FROM_ALL)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT TARGET nlohmann_json)
|
||||
set(JSON_BuildTests_INIT OFF CACHE INTERNAL "")
|
||||
add_subdirectory(libs/nlohmann_json EXCLUDE_FROM_ALL)
|
||||
ENDIF()
|
||||
|
||||
IF (NOT TARGET yaml-cpp)
|
||||
set(YAML_CPP_BUILD_TESTS OFF CACHE INTERNAL "")
|
||||
@@ -45,16 +50,24 @@ ENDIF()
|
||||
|
||||
|
||||
add_library(kubecontrol STATIC
|
||||
|
||||
include/kubecontrol/kubecontrol.hpp
|
||||
src/kubecontrol/kubecontrol.cpp
|
||||
|
||||
)
|
||||
include/kubecontrol/KubePod.hpp
|
||||
src/kubecontrol/KubePod.cpp
|
||||
|
||||
include/kubecontrol/WriterMemoryClass.hpp
|
||||
|
||||
)
|
||||
|
||||
|
||||
target_link_libraries(kubecontrol
|
||||
yaml-cpp
|
||||
curlcpp
|
||||
curl
|
||||
curlpp
|
||||
loguru
|
||||
nlohmann_json
|
||||
pthread
|
||||
)
|
||||
target_include_directories(kubecontrol PUBLIC
|
||||
@@ -64,7 +77,9 @@ target_include_directories(kubecontrol PUBLIC
|
||||
|
||||
|
||||
|
||||
|
||||
add_custom_command(TARGET kubecontrol POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_SOURCE_DIR}/config $<TARGET_FILE_DIR:${PROJECT_NAME}>/config)
|
||||
#
|
||||
# Everything TEST related
|
||||
#
|
||||
@@ -78,6 +93,9 @@ IF (${TEST_KUBECONTROL_LIBRARY})
|
||||
target_link_libraries(test_kubecontrol Catch2::Catch2 kubecontrol loguru)
|
||||
catch_discover_tests(test_kubecontrol)
|
||||
|
||||
add_executable(test_KubePod tests/test_KubePod.cpp)
|
||||
target_link_libraries(test_KubePod Catch2::Catch2 kubecontrol loguru)
|
||||
catch_discover_tests(test_KubePod)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user