代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.0)
# Read project configuration from configure.ac file
file(STRINGS configure.ac _PROJECT_CONFIGS
REGEX "(AC_INIT\\()")
foreach(_PROJECT_CONFIG ${_PROJECT_CONFIGS})
if(_PROJECT_CONFIG MATCHES "AC_INIT\\(([^,]+)")
string(STRIP ${CMAKE_MATCH_1} PROJECT_NAME)
endif()
if(_PROJECT_CONFIG MATCHES "AC_INIT\\([^,]+,([^\\)]+)")
string(STRIP ${CMAKE_MATCH_1} PROJECT_VERSION)
endif()
endforeach()
project(${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
LANGUAGES C CXX)
set(${PROJECT_NAME}_MAKE_INSTALL ON CACHE BOOL
"Set to OFF to disable install rules (default is ON)")
set(${PROJECT_NAME}_BUILD_EXAMPLES OFF CACHE BOOL
"Set to ON to build examples (default is OFF)")
# Determine stdlib link flags
if (WIN32)
set(DEFAULT_BUILD_STANDALONE ON)
else()
set(DEFAULT_BUILD_STANDALONE OFF)
endif()
set(BUILD_STANDALONE ${DEFAULT_BUILD_STANDALONE}
CACHE BOOL "Set to ON to make the executables as standalone as possible.")
# Check type size
include(CheckTypeSize)
check_type_size("int" SIZEOF_INT)
check_type_size("long" SIZEOF_LONG)
check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
check_type_size("void *" SIZEOF_VOID_P)
# Check system headers
include(CheckIncludeFile)
check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
check_include_file(sys/wait.h HAVE_SYS_WAIT_H)
check_include_file(unistd.h HAVE_UNISTD_H)
# Prepare settings
if("${CMAKE_BUILD_TYPE}" MATCHES "[Dd][Ee][Bb]")
set(DEBUG 1)
endif()
set(VERSION "${PROJECT_VERSION}")
set(PUBDATE "${PROJECT_PUBDATE}")
# Common compile definitions
set(common_COMPILE_DEFINITIONS PREFIX="${CMAKE_INSTALL_PREFIX}")
add_subdirectory(src)
add_subdirectory(colm)
add_library(colm::libcolm ALIAS libcolm)
add_executable(colm::colm ALIAS colm)
add_subdirectory(ragel)
if(${PROJECT_NAME}_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。