CMakeLists.txt 975 字节
Newer Older
H
Haojun Liao 已提交
1 2 3 4 5 6 7

MESSAGE(STATUS "build planner unit test")

# GoogleTest requires at least C++11
SET(CMAKE_CXX_STANDARD 11)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST)

8 9 10 11 12 13
ADD_EXECUTABLE(plannerTest
        ${SOURCE_LIST}
        "${SOURCE_LIST}/../../../parser/test/mockCatalog.cpp"
        "${SOURCE_LIST}/../../../parser/test/mockCatalogService.cpp"
)

H
Haojun Liao 已提交
14 15
TARGET_LINK_LIBRARIES(
        plannerTest
X
Xiaoyu Wang 已提交
16
        PUBLIC os util common nodes planner parser catalog transport gtest function qcom
H
Haojun Liao 已提交
17 18 19 20
)

TARGET_INCLUDE_DIRECTORIES(
        plannerTest
wafwerar's avatar
wafwerar 已提交
21 22 23
        PUBLIC "${TD_SOURCE_DIR}/include/libs/planner/"
        PRIVATE "${TD_SOURCE_DIR}/source/libs/planner/inc"
        PRIVATE "${TD_SOURCE_DIR}/source/libs/parser/test"
H
Haojun Liao 已提交
24
)
wafwerar's avatar
wafwerar 已提交
25 26 27 28 29 30 31 32


if(${BUILD_WINGETOPT})
    target_include_directories(
        plannerTest
        PUBLIC "${TD_SOURCE_DIR}/contrib/wingetopt/src"
    )
    target_link_libraries(plannerTest PUBLIC wingetopt)
33 34 35 36 37 38
endif()

add_test(
    NAME plannerTest
    COMMAND plannerTest
)