代码拉取完成,页面将自动刷新
同步操作将从 李玉大哥/isaac 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.5)
project(isaac)
set(CMAKE_CXX_STANDARD 11)
#优化等级
#set(CMAKE_CXX_FLAGS "-O2")
#生成调试信息
set(CMAKE_CXX_FLAGS "-g")
#打印所有警告信息
set(CMAKE_CXX_FLAGS "-Wall")
#过期方法不进行警告
#set(CMAKE_CXX_FLAGS "-Wno-deprecated")
#当前模式
#set(CMAKE_BUILD_TYPE Release)
#.c .cpp文件
aux_source_directory(${PROJECT_SOURCE_DIR}/src/utils SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/core SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/log SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/http_balance SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/http_client SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/parser/llhttp SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/parser/protocol SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/resource/llhttp SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/resource/zlib SRC_LIST)
#.h文件
#set(INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include/parser/http/llhttp)
#include_directories(${INCLUDE_DIR})
#预定义宏
#add_definitions(-DNDEBUG)
add_compile_definitions(ISAAC_LOG=1)
add_compile_definitions(ISAAC_LOG_CHECK=1)
#add_compile_definitions(ISAAC_DEBUG=1)
#add_compile_definitions(ISAAC_PARSE_CHECK=1)
#add_compile_definitions(ISAAC_REQ_MAX_CHECK=1)
#操作系统层面不同处
if (CMAKE_HOST_APPLE)
add_compile_definitions(ISAAC_APPLE=1)
add_compile_definitions(ISAAC_TEST_PATH="/Users/liyudage/Documents/clion-workspace/isaac-loadbalance/bin/log/")
message("OS IS MACOS")
#mac
include_directories(${PROJECT_SOURCE_DIR}/include/core/unix INCLUDE_DIR)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/core/unix SRC_LIST)
include_directories(${PROJECT_SOURCE_DIR}/include/core/kqueue INCLUDE_DIR)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/core/kqueue SRC_LIST)
# include_directories(${PROJECT_SOURCE_DIR}/include/core/poll INCLUDE_DIR)
# aux_source_directory(${PROJECT_SOURCE_DIR}/src/core/poll SRC_LIST)
#openssl
set(OPENSSL_INCLUDE_DIR /Users/liyudage/Documents/resources/openssl/include)
include_directories(${OPENSSL_INCLUDE_DIR})
elseif (CMAKE_HOST_UNIX)
add_compile_definitions(ISAAC_LINUX=1)
add_compile_definitions(ISAAC_TEST_PATH="/home/liyu/application/clion-workspace/isaac-loadbalance/bin/log/")
message("OS IS LINUX")
#linux需要用ASAN
set(CMAKE_CXX_FLAGS "-fsanitize=address")
set(CMAKE_CXX_FLAGS "-fno-stack-protector")
set(CMAKE_CXX_FLAGS "-fno-omit-frame-pointer")
#linux
include_directories(${PROJECT_SOURCE_DIR}/include/core/unix INCLUDE_DIR)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/core/unix SRC_LIST)
include_directories(${PROJECT_SOURCE_DIR}/include/core/epoll INCLUDE_DIR)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/core/epoll SRC_LIST)
# include_directories(${PROJECT_SOURCE_DIR}/include/core/poll INCLUDE_DIR)
# aux_source_directory(${PROJECT_SOURCE_DIR}/src/core/poll SRC_LIST)
#openssl
# set(OPENSSL_INCLUDE_DIR /home/liyu/application/openssl/include)
# include_directories(${OPENSSL_INCLUDE_DIR})
set(OPENSSL_INCLUDE_DIR /home/lyee/Applications/resources/openssl/include)
include_directories(${OPENSSL_INCLUDE_DIR})
elseif (CMAKE_HOST_WIN32)
add_compile_definitions(ISAAC_WIN32=1)
add_compile_definitions(_WIN32_WINNT=0x0600)
add_compile_definitions(_POSIX=1)
add_compile_definitions(ISAAC_TEST_PATH="D:/clion-workspace/isaac-loadbalance/bin/log/")
message("OS IS WINDOWS")
#需要的一些库
set(CMAKE_CXX_FLAGS "-lwinmm")
link_libraries(ws2_32)
link_libraries(kernel32)
#windows专有的
include_directories(${PROJECT_SOURCE_DIR}/include/core/win32 INCLUDE_DIR)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/core/win32 SRC_LIST)
include_directories(${PROJECT_SOURCE_DIR}/include/core/wsapoll INCLUDE_DIR)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/core/wsapoll SRC_LIST)
#openssl windows编译的openssl有bug暂时不能使用
endif ()
add_subdirectory(test)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。