auto_bus/test/CMakeLists.txt
jackfiled bcff483797 完成了配置文件读取函数
添加了配置文件单元测试
配置文件读取函数单元测试完成
2022-05-20 11:18:12 +08:00

30 lines
706 B
CMake

cmake_minimum_required(VERSION 3.0)
project(bus_test)
set(CMAKE_CXX_STANDARD 11)
add_subdirectory(./GTest)
include_directories(GTest/googletest/include)
include_directories(GTest/googlemock/include)
include_directories(../include)
aux_source_directory("../src/" SRCS)
aux_source_directory("${CMAKE_CURRENT_SOURCE_DIR}" TEST_SRCS)
add_executable(bus_test ${SRCS} ${TEST_SRCS})
target_link_libraries(bus_test
PRIVATE
gtest
gtest_main
gmock
gmock_main
pthread
)
add_custom_command(TARGET bus_test POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/dict.dic"
$<TARGET_FILE_DIR:bus_test>
)