代码拉取完成,页面将自动刷新
# Copyright (C) 2015 Shang Yuanchun <[email protected]>
project(bitzer)
cmake_minimum_required(VERSION 2.6)
message(STATUS "Running cmake version ${CMAKE_VERSION}")
set(BITZER_VERSION "0.0.1")
set(CMAKE_COLOR_MAKEFILE ON)
set(CMAKE_VERBOSE_MAKEFILE OFF)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
# whether bz_log_debug() is available
if (CMAKE_BUILD_TYPE)
string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
endif (CMAKE_BUILD_TYPE)
if (BUILD_TYPE STREQUAL "DEBUG" OR DEBUG_LOG)
set(BZ_DEBUG_LOG TRUE)
endif (BUILD_TYPE STREQUAL "DEBUG" OR DEBUG_LOG)
if (LOG_PATH)
set(BZ_LOG_PATH TRUE)
endif (LOG_PATH)
if (CONF_PATH)
set(BZ_CONF_PATH TRUE)
endif (CONF_PATH)
if (PID_PATH)
set(BZ_PID_PATH TRUE)
endif (PID_PATH)
find_package(Flex REQUIRED)
find_package(Bison REQUIRED)
# check header files
include(CheckIncludeFiles)
# check functions
include(CheckFunctionExists)
check_function_exists(backtrace HAVE_BACKTRACE)
check_function_exists(backtrace_symbols HAVE_BACKTRACE_SYMBOLS)
check_function_exists(posix_memalign HAVE_POSIX_MEMALIGN)
check_function_exists(memalign HAVE_MEMALIGN)
check_function_exists(getopt_long HAVE_GETOPT_LONG)
check_function_exists(getifaddrs HAVE_GETIFADDRS)
check_function_exists(pselect HAVE_PSELECT)
include_directories(${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/src
)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if (CMAKE_COMPILER_IS_GNUCC)
add_definitions(-D_GNU_SOURCE)
endif (CMAKE_COMPILER_IS_GNUCC)
configure_file(config.h.cmake ${PROJECT_BINARY_DIR}/config.h)
add_subdirectory(src)
if (NOT DEFINED CONF_PATH)
install(FILES ${PROJECT_SOURCE_DIR}/conf/bitzer.conf DESTINATION conf)
endif (NOT DEFINED CONF_PATH)
if (NOT DEFINED LOG_PATH)
install(DIRECTORY DESTINATION log)
endif (NOT DEFINED LOG_PATH)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。