1 Star 0 Fork 33

rENYI/BitMQ

forked from 风尘叹/BitMQ 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.77 KB
一键复制 编辑 原始数据 按行查看 历史
风尘叹 提交于 2018-04-08 15:39 . Change: 修改了性能测试数据
# This is a cmake script. Process it with the CMake gui or command line utility
# to produce makefiles / Visual Studio project files on Mac OS X and Windows.
#
# To configure the build options either use the CMake gui, or run the command
# line utility including the "-i" option.
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
project(bmq)
cmake_minimum_required(VERSION 2.8)
# Only for version 3 and up. cmake_policy(SET CMP0042 NEW)
set (VERSION 0.6.0)
if (WIN32)
execute_process(COMMAND cmd /c echo %DATE% %TIME% OUTPUT_VARIABLE TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
else (WIN32)
execute_process(COMMAND date "+%F %T%z" OUTPUT_VARIABLE TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
#SET(CMAKE_C_FLAGS "-O0 -Wall -g -ggdb")
#SET(CMAKE_CXX_FLAGS "-O0 -Wall -g -ggdb")
SET(CMAKE_C_FLAGS "-O3 -Wall")
SET(CMAKE_CXX_FLAGS "-O3 -Wall")
endif (WIN32)
add_definitions (-DCMAKE -DBMQ_VERSION=\"${VERSION}\" -DBMQ_TIMESTAMP=\"${TIMESTAMP}\")
if (WIN32)
set (BINDIR .)
set (SBINDIR .)
set (SYSCONFDIR .)
set (LIBDIR .)
set (INCLUDEDIR .)
add_definitions("-D_CRT_SECURE_NO_WARNINGS")
add_definitions("-D_CRT_NONSTDC_NO_DEPRECATE")
else (WIN32)
set (BINDIR bin)
set (SBINDIR sbin)
set (SYSCONFDIR /etc/bmq)
set (LIBDIR lib${LIB_SUFFIX})
set (INCLUDEDIR include)
endif (WIN32)
option(WITH_TLS
"Include SSL/TLS support?" ON)
if (${WITH_TLS} STREQUAL ON)
find_package(OpenSSL REQUIRED)
add_definitions("-DWITH_TLS")
else (${WITH_TLS} STREQUAL ON)
set (OPENSSL_INCLUDE_DIR "")
endif (${WITH_TLS} STREQUAL ON)
# ========================================
# Include projects
# ========================================
add_subdirectory(src)
# ========================================
# Install config file
# ========================================
install(FILES bmq.conf DESTINATION ${SYSCONFDIR})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/renyi/Webit.git
git@gitee.com:renyi/Webit.git
renyi
Webit
BitMQ
master

搜索帮助