CMakeLists.txt 3.1 KB
Newer Older
J
jikui 已提交
1
project(iSulad_UT)
J
jingrui 已提交
2

J
jikui 已提交
3
SET(EXE isula_rt_ops_ut)
J
jingrui 已提交
4 5

add_executable(${EXE}
L
lifeng68 已提交
6 7 8 9 10 11 12 13 14 15 16 17
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_regex.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_verify.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_array.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_string.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_convert.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/utils_file.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/util_atomic.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/sha256/sha256.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/path.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/map/map.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/map/rb_tree.c
L
lifeng68 已提交
18 19 20 21
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/libisulad.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/spec//sysinfo.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/cmd/command_parser.c
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/daemon_arguments.c
J
jikui 已提交
22
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/image/oci/oci_ut_common.cpp
J
jingrui 已提交
23 24 25 26 27
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/containers_store_mock.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/namespace_mock.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/container_unix_mock.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/engine_mock.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks/isulad_config_mock.cc
L
lifeng68 已提交
28
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/runtime/isula/isula_rt_ops.c
J
jikui 已提交
29
    isula_rt_ops_ut.cpp)
J
jingrui 已提交
30 31 32 33

target_include_directories(${EXE} PUBLIC
    ${GTEST_INCLUDE_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}/../../include
L
lifeng68 已提交
34
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils
J
jingrui 已提交
35
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src
L
lifeng68 已提交
36
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/cutils/map
L
lifeng68 已提交
37 38 39 40 41 42
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/services/execution/manager
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/events
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/runtime
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/runtime/isula
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/spec/
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/runtime/engines
J
jingrui 已提交
43
    ${CMAKE_BINARY_DIR}/conf
L
lifeng68 已提交
44
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/sha256
J
jingrui 已提交
45 46
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/config
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/cmd
L
lifeng68 已提交
47 48 49 50
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/container
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/container/restart_manager
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/daemon/container/health_check
L
lifeng68 已提交
51
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/utils/console
J
jingrui 已提交
52 53 54
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../test/mocks
    )

L
lifeng68 已提交
55
target_link_libraries(${EXE} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARY} ${GMOCK_MAIN_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${ISULA_LIBUTILS_LIBRARY} -lpthread -lgrpc++ -lprotobuf -lcrypto -lyajl -lz)