CMakeLists.txt 564 字节
Newer Older
H
hjxilinx 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine)

FIND_PATH(HEADER_GTEST_INCLUDE_DIR gtest.h /usr/include/gtest /usr/local/include/gtest)
FIND_LIBRARY(LIB_GTEST_STATIC_DIR libgtest.a /usr/lib/ /usr/local/lib)

IF (HEADER_GTEST_INCLUDE_DIR AND LIB_GTEST_STATIC_DIR)
    MESSAGE(STATUS "gTest library found, build unit test")

    INCLUDE_DIRECTORIES(${HEADER_GTEST_INCLUDE_DIR})
    AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST)

    ADD_EXECUTABLE(utilTest ${SOURCE_LIST})
H
hzcheng 已提交
14
    TARGET_LINK_LIBRARIES(utilTest tutil common gtest pthread)
H
hjxilinx 已提交
15
ENDIF()