代码拉取完成,页面将自动刷新
同步操作将从 openEuler/clibcni 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required (VERSION 2.8)
project (clibcni)
option(VERSION "set clibcni version" ON)
if (VERSION STREQUAL "ON")
set(CLIBCNI_VERSION "2.0.4")
endif()
option(DEBUG "set clibcni gcc option" ON)
if (DEBUG STREQUAL "ON")
add_definitions("-g -o2")
endif()
option(GCOV "set clibcni gcov option" OFF)
if (GCOV STREQUAL "ON")
set(CLIBCNI_GCOV "ON")
endif()
# check depends libs and headers
include(cmake/checker.cmake)
if (CHECKER_RESULT)
return()
endif()
set(CMAKE_C_FLAGS "-fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -Wall -Werror")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-E -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIE -pie -shared -pthread")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-E -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIE -shared -pthread")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
"${CMAKE_BINARY_DIR}/conf/config.h"
)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/clibcni.pc.in"
"${CMAKE_BINARY_DIR}/conf/clibcni.pc"
)
# build which type of clibcni library
option(USESHARED "set type of libclibcni, default is shared" ON)
if (USESHARED STREQUAL "ON")
set(LIBTYPE "SHARED")
message("-- Build shared library")
else ()
set(LIBTYPE "STATIC")
message("-- Build static library")
endif()
if (LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR_DEFAULT ${LIB_INSTALL_DIR})
else()
set(LIB_INSTALL_DIR_DEFAULT "lib")
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
# install all files
install(FILES ${CMAKE_BINARY_DIR}/conf/clibcni.pc
DESTINATION ${LIB_INSTALL_DIR_DEFAULT}/pkgconfig PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE)
install(FILES src/types/types.h DESTINATION include/clibcni)
install(FILES src/version/version.h DESTINATION include/clibcni)
install(FILES src/api.h DESTINATION include/clibcni)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。