代码拉取完成,页面将自动刷新
同步操作将从 OSCC/iMAP 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(imap LANGUAGES CXX)
############################################################
### common settings
############################################################
message("STEP2: common settings")
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(ENABLE_EXAMPLE "enable examples" OFF)
option(ENABLE_TEST "enable test" OFF)
option(ENABLE_GPROF "enable gprof tool for profiling" OFF)
option(ENABLE_DOXYGEN "enable doxygen tool for generate the docs" OFF)
# ###########################################################
# ## config bebug/release mode
# ###########################################################
set(CMAKE_CXX_FLAGS "-Wall -Wno-unknown-pragmas -Werror=return-type")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
find_package(OpenMP REQUIRED)
if(OpenMP_FOUND)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
else()
message(FATAL_ERROR "openmp not found!")
endif()
message("STEP3: config bebug/release mode")
if( CMAKE_BUILD_TYPE AND (CMAKE_BUILD_TYPE STREQUAL "Debug") )
if(ENABLE_GPROF)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
endif(ENABLE_GPROF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
message("Debug mode CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
elseif( CMAKE_BUILD_TYPE AND (CMAKE_BUILD_TYPE STREQUAL "Release") )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
message("Release mode CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
message("default Release mode CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
endif()
############################################################
### sub directories
############################################################
message("STEP4: add subdirectories")
add_subdirectory(include)
add_subdirectory(libs)
add_subdirectory(cli)
if(ENABLE_TEST)
add_subdirectory(test)
endif(ENABLE_TEST)
if(ENABLE_EXAMPLE)
add_subdirectory(examples)
endif(ENABLE_EXAMPLE)
############################################################
### Doxygen
############################################################
find_package(Doxygen)
if (ENABLE_DOXYGEN)
message("STEP7: it will generate doxygen docs when making it!")
if (DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.cfg)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
# note the option ALL which allows to build the docs together with the application
add_custom_target( docs
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
# else (DOXYGEN_FOUND AND BUILD_DOXYGEN)
else ()
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
endif(ENABLE_DOXYGEN)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。