1 Star 1 Fork 0

Shang Yuanchun/bitzer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
# 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)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/ideal/bitzer.git
[email protected]:ideal/bitzer.git
ideal
bitzer
bitzer
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385