1 Star 0 Fork 17

C-Band/knet

forked from CageQ/knet 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
cageq 提交于 2022-01-25 01:01 . correct multithread send
cmake_minimum_required (VERSION 3.1.0)
project (knet)
set(CMAKE_CXX_STANDARD 17)
include_directories("include")
#include_directories("opt/asio/asio/include")
include_directories("opt/asio-1.19.2/include")
include_directories("opt/spdlog-1.9.2/include")
include_directories("kcp")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -stdlib=libc++ -Wno-unused-function -g ")
elseif(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -g -Wno-unused-function -O2 ")
elseif(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D NDEBUG")
endif()
include_directories(opt/fmt-8.0.1/include)
add_subdirectory(opt/fmt-8.0.1 EXCLUDE_FROM_ALL)
ADD_DEFINITIONS(-DASIO_STANDALONE)
#add the executable
#add_executable(server samples/server.cpp )
#add_executable(mtserver samples/mt_server.cpp )
add_executable(tcpserver samples/tcpserver.cpp )
add_executable(tcpclient samples/tcpclient.cpp)
add_executable(fserver samples/factory_server.cpp)
add_executable(webserver samples/webserver.cpp )
add_executable(webclient samples/webclient.cpp )
add_executable(wsclient samples/wsclient.cpp )
add_executable(wsserver samples/wsserver.cpp )
add_executable(kcpserver samples/kcpserver.cpp kcp/ikcp.c)
add_executable(udpclient samples/udpclient.cpp )
add_executable(udpserver samples/udpserver.cpp )
add_executable(pipeserver samples/pipe_server.cpp )
add_executable(pipeclient samples/pipe_client.cpp )
add_executable(unbindpipeclient samples/unbind_pipe_client.cpp )
add_executable(unbindpipeserver samples/unbind_pipe_server.cpp )
add_executable(testurl samples/test_url.cpp )
add_executable(timeclient samples/timeclient.cpp)
add_executable(timeserver samples/timeserver.cpp)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/C-BAND/knet.git
git@gitee.com:C-BAND/knet.git
C-BAND
knet
knet
master

搜索帮助