代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.17)
project(test)
set(CMAKE_CXX_STANDARD 11)
# ------------------------------------------------------------------
# gtest
# ------------------------------------------------------------------
include_directories("/usr/local/include")
link_directories("/usr/local/lib/")
# ------------------------------------------------------------------
# source files
# ------------------------------------------------------------------
include_directories(src/samples1)
AUX_SOURCE_DIRECTORY(src/samples1 samples1_code)
include_directories(src/samples2)
AUX_SOURCE_DIRECTORY(src/samples2 samples2_code)
include_directories(src/samples3)
AUX_SOURCE_DIRECTORY(src/samples3 samples3_code)
include_directories(src/samples4)
AUX_SOURCE_DIRECTORY(src/samples4 samples4_code)
include_directories(src/samples5)
AUX_SOURCE_DIRECTORY(src/samples5 samples5_code)
include_directories(src/samples678)
AUX_SOURCE_DIRECTORY(src/samples678 samples6_code)
include_directories(src/samples9)
AUX_SOURCE_DIRECTORY(src/samples9 samples9_code)
include_directories(src/samples10)
AUX_SOURCE_DIRECTORY(src/samples10 samples10_code)
include_directories(src/moke)
AUX_SOURCE_DIRECTORY(src/moke moke_code)
add_executable(test main.cpp
${samples1_code}
${samples2_code}
${samples3_code}
${samples4_code}
${samples5_code}
${samples6_code}
)
target_link_libraries(test pthread gtest)
# 事件案例, 可以定制化输出,但是必须包含 main
add_executable(test_cb ${samples9_code})
target_link_libraries(test_cb pthread gtest)
# 内存泄露检测
add_executable(test_malloc ${samples10_code})
target_link_libraries(test_malloc pthread gtest)
# 内存泄露检测
add_executable(test_moke ${moke_code})
target_link_libraries(test_moke pthread gtest gmoke)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。