Mod aaa-12 添加gtest开关

SOL:
修改人:huangxin
检视人:huangxin
This commit is contained in:
huangxin 2019-12-17 10:00:40 +08:00
parent ff30a7c9e2
commit 45d07fddf5
2 changed files with 4 additions and 2 deletions

View File

@ -19,7 +19,9 @@ if(USED_JEMALLOC)
LINK_LIBRARIES(-ljemalloc)
endif()
if(ENABLE_GTEST)
ADD_SUBDIRECTORY(./unit_test)
endif()
LINK_LIBRARIES(-lpthread -lcjson -lconfig -lcurl)
@ -29,4 +31,4 @@ ADD_EXECUTABLE(ztp_client ${ZTP_SRC} ztp_main.c)
INCLUDE_DIRECTORIES("./include")
INSTALL(TARGETS ztp_client RUNTIME DESTINATION bin)
#INSTALL(TARGETS ztp_client RUNTIME DESTINATION bin)

View File

@ -46,4 +46,4 @@ ADD_EXECUTABLE(ztp_unit ${ZTPLIB_SRC} ${TEST_SRC})
TARGET_LINK_LIBRARIES(ztp_unit gtest_main -lpthread -lcjson -lconfig -lcurl)
ADD_TEST(NAME ztp_unit_test COMMAND ztp_unit)
INSTALL(TARGETS ztp_unit RUNTIME DESTINATION bin)
#INSTALL(TARGETS ztp_unit RUNTIME DESTINATION bin)