代码拉取完成,页面将自动刷新
同步操作将从 Eric Ling/sponge 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.10)
project(sponge C CXX)
option(SPONGE_DISABLE_EXAMPLES "Disable build of sponge examples." OFF)
option(SPONGE_DISABLE_TESTS "Disable build of sponge tests." OFF)
# <------------ copy configuration file to bin --------------->
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
# Set the source directory of your configuration files
set(CONFIG_FILES
${PROJECT_SOURCE_DIR}/mysql.cnf
${PROJECT_SOURCE_DIR}/redis.cnf
# ${PROJECT_SOURCE_DIR}/config_file3.txt
)
# Set the destination directory of your configuration files in the build directory
set(CONFIG_FILES_DESTINATION ${PROJECT_SOURCE_DIR}/bin)
# Copy the configuration files from the source directory to the build directory
file(COPY ${CONFIG_FILES} DESTINATION ${CONFIG_FILES_DESTINATION})
# <---------- set c++ standard ------------->
# NOTE: you must build redis-plus-plus and your application code with the same standard.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# <------------ add muduo dependency --------------->
find_path(MUDUO_HEADER muduo REQUIRED)
find_library(MUDUO_BASE_LIB muduo_base REQUIRED)
find_library(MUDUO_NET_LIB muduo_net REQUIRED)
message("Found MUDUO_HEADER: ${MUDUO_HEADER}")
message("Found MUDUO_BASE_LIB: ${MUDUO_BASE_LIB}")
message("Found MUDUO_NET_LIB: ${MUDUO_NET_LIB}")
include_directories(${MUDUO_HEADER})
# <------------ add hiredis dependency --------------->
find_path(HIREDIS_HEADER hiredis REQUIRED)
find_library(HIREDIS_LIB hiredis REQUIRED)
message("Found HIREDIS_HEADER: ${HIREDIS_HEADER}")
message("Found HIREDIS_LIB: ${HIREDIS_LIB}")
include_directories(${HIREDIS_HEADER})
# <------------ add redis-plus-plus dependency -------------->
# NOTE: this should be *sw* NOT *redis++*
find_path(REDIS_PLUS_PLUS_HEADER sw REQUIRED)
find_library(REDIS_PLUS_PLUS_LIB redis++ REQUIRED)
message("Found REDIS_PLUS_PLUS_HEADER: ${REDIS_PLUS_PLUS_HEADER}")
message("Found REDIS_PLUS_PLUS_LIB: ${REDIS_PLUS_PLUS_LIB}")
include_directories(${REDIS_PLUS_PLUS_HEADER})
include_directories(thirdparty)
include_directories(src/include)
include_directories(src/include/database)
include_directories(src/include/database/mysql)
include_directories(src/include/log)
include_directories(src/include/model)
include_directories(src/include/threadpool)
include_directories(src/include/service)
include_directories(src/include/server)
include_directories(src/include/redis)
add_subdirectory(src)
# Add the example subdirectory if the option is not disabled
if (NOT SPONGE_DISABLE_EXAMPLES)
add_subdirectory(example)
endif()
# Add the test subdirectory if the option is not disabled
if (NOT SPONGE_DISABLE_TESTS)
add_subdirectory(test)
endif()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。