2 Star 14 Fork 4

gavingqf/anet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
gaoqingfeng 提交于 2024-06-02 18:07 . add rpc call
cmake_minimum_required(VERSION 2.4)
# project name
SET(PROJECTNAME anet)
# set out put path
SET(LIBRARY_OUTPUT_PATH ./lib)
# project name.
project(${PROJECTNAME})
# c or cpp compiler.
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)
# find lib at /usr/lib
FIND_LIBRARY(PTHREAD_LIB pthread /usr/lib)
# include directories.
INCLUDE_DIRECTORIES(
./
./asio
./util
./log
./timer
./pool
./msgpack-c
./rpc
)
#definition flag
add_definitions(
-std=c++17
-g
-O3
-Wall
# -Wno-unused-variable
# -Wno-deprecated
)
# source directory setting.
file(GLOB SRC_FILES "*.cpp" "*.hpp" "*.h" "*.c" "*.cc")
aux_source_directory(./timer TIMER_SRC)
aux_source_directory(./log LOG_SRC)
aux_source_directory(./pool POOL_SRC)
aux_source_directory(./util UTIL_SRC)
#set src files
#merge all sourses files to SRC.
set(SRC
${SRC_FILES}
${TIMER_SRC}
${LOG_SRC}
${POOL_SRC}
${UTIL_SRC}
)
# .so or .a file output.
#ADD_LIBRARY(${PROJECTNAME} SHARED ${SRC})
ADD_LIBRARY(${PROJECTNAME} STATIC ${SRC})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/gavingqf/anet.git
git@gitee.com:gavingqf/anet.git
gavingqf
anet
anet
master

搜索帮助