代码拉取完成,页面将自动刷新
同步操作将从 zjlian/server-framework 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.15)
project(server_framework)
# SET(CMAKE_C_COMPILER "/usr/bin/gcc-9")
# SET(CMAKE_CXX_COMPILER "/usr/bin/g++-9")
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -rdynamic -O0 -ggdb -std=c++14 -Wall -Wno-deprecated -Werror -Wno-unused-function -Wno-unused-variable")
set(CMAKE_CXX_STANDARD 14)
# 引入boost
#set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.58.0 COMPONENTS REQUIRED)
if (Boost_FOUND)
message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
message(STATUS "Boost_VERSION: ${Boost_VERSION}")
include_directories(${Boost_INCLUDE_DIRS})
endif ()
include_directories(.)
include_directories(/usr/local/include)
link_directories(/usr/local/lib)
add_library(${PROJECT_NAME} SHARED
src/log.cc src/log.h
src/util.cc src/util.h
src/config.cc src/config.h
src/thread.cc src/thread.h
src/exception.cc src/exception.h
src/fiber.cc src/fiber.h
src/scheduler.cc src/scheduler.h)
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} yaml-cpp pthread)
add_executable(test_log ${PROJECT_SOURCE_DIR}/tests/test_log.cc)
add_dependencies(test_log ${PROJECT_NAME})
target_link_libraries(test_log ${PROJECT_NAME})
add_executable(test_config ${PROJECT_SOURCE_DIR}/tests/test_config.cc)
add_dependencies(test_config ${PROJECT_NAME})
target_link_libraries(test_config ${PROJECT_NAME})
add_executable(test_thread ${PROJECT_SOURCE_DIR}/tests/test_thread.cc)
add_dependencies(test_thread ${PROJECT_NAME})
target_link_libraries(test_thread ${PROJECT_NAME})
add_executable(test_exception ${PROJECT_SOURCE_DIR}/tests/test_exception.cc)
add_dependencies(test_exception ${PROJECT_NAME})
target_link_libraries(test_exception ${PROJECT_NAME})
add_executable(test_fiber ${PROJECT_SOURCE_DIR}/tests/test_fiber.cc)
add_dependencies(test_fiber ${PROJECT_NAME})
target_link_libraries(test_fiber ${PROJECT_NAME})
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。