代码拉取完成,页面将自动刷新
同步操作将从 cocalele/PureFlash 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.1)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0015 NEW)
endif()
project(PureFlash)
if(LINUX)
find_program(ANT ant)
if(NOT ANT)
message(FATAL_ERROR "ant not found! need it to build zookeeper c client")
endif()
endif(LINUX)
set(BUILD_ROOT_DIR ${CMAKE_BINARY_DIR})
set(CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(THIRDPARTY ${CMAKE_CURRENT_SOURCE_DIR}/thirdParty)
set(ZOOKEEPER_SOURCE ${THIRDPARTY}/zookeeper/zookeeper-client/zookeeper-client-c)
set(ZOOKEEPER_INC ${ZOOKEEPER_SOURCE}/include ${ZOOKEEPER_SOURCE}/generated)
set(ZOOKEEPER_BIN ${ZOOKEEPER_SOURCE}/.libs)
macro(USE_ZOOKEEPER)
if(UNIX)
foreach(f ${ZOOKEEPER_SOURCE}/generated/zookeeper.jute.h ${ZOOKEEPER_SOURCE}/generated/zookeeper.jute.c)
if(NOT EXISTS "${f}")
execute_process(COMMAND ant clean
WORKING_DIRECTORY ${THIRDPARTY}/zookeeper)
execute_process(COMMAND ant compile_jute
WORKING_DIRECTORY ${THIRDPARTY}/zookeeper)
endif()
endforeach()
endif(UNIX)
add_definitions(-DTHREADED)# to use zookeeper multi thread library
include_directories(${ZOOKEEPER_INC})
link_directories(${ZOOKEEPER_BIN})
endmacro()
macro(use_cxx11)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()
endmacro(use_cxx11)
macro(USE_ISA_L)
execute_process(COMMAND ./autogen.sh
WORKING_DIRECTORY ${THIRDPARTY}/isa-l_crypto)
execute_process(COMMAND ./configure
WORKING_DIRECTORY ${THIRDPARTY}/isa-l_crypto)
execute_process(COMMAND make -j 4
WORKING_DIRECTORY ${THIRDPARTY}/isa-l_crypto)
# execute_process(COMMAND make install
# WORKING_DIRECTORY ${THIRDPARTY}/isa-l_crypto)
endmacro(USE_ISA_L)
INCLUDE(CheckIncludeFiles)
CHECK_INCLUDE_FILES("rdma/rdma_cma.h" HAVE_RDMA_H)
IF (HAVE_RDMA_H)
add_definitions(-DWITH_RDMA)
ENDIF (HAVE_RDMA_H)
USE_ZOOKEEPER()
USE_ISA_L()
add_compile_options (-fdiagnostics-color=always)
add_subdirectory(${ZOOKEEPER_SOURCE})
add_subdirectory(pfs)
add_subdirectory(common)
add_custom_target(scripts ALL
COMMAND cp -rpfu ${CMAKE_CURRENT_SOURCE_DIR}/scripts ${CMAKE_BINARY_DIR}
# COMMAND cp -rpfu ${ZOOKEEPER_SOURCE}/.libs/libzookeeper_mt.a ${CMAKE_BINARY_DIR}
COMMAND mv -f ${CMAKE_BINARY_DIR}/scripts/env.sh ${CMAKE_BINARY_DIR}/..
COMMAND cp -rp ${CMAKE_CURRENT_SOURCE_DIR}/testing ${BUILD_ROOT_DIR}
)
if (DEFINED FIO_DIR)
execute_process(COMMAND ./configure --pfbd-include=${CMAKE_CURRENT_SOURCE_DIR}/common/include --pfbd-lib=${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${FIO_DIR})
# add_custom_target(fio
# COMMAND rm -f ./fio
# COMMAND make
# DEPENDS ${CMAKE_BINARY_DIR}/libs5common.a
# WORKING_DIRECTORY ${FIO_DIR}
# )
# add_dependencies(fio s5common)
add_custom_command(OUTPUT ${FIO_DIR}/fio
COMMAND rm -f ./fio
COMMAND make
DEPENDS ${CMAKE_BINARY_DIR}/libs5common.a
WORKING_DIRECTORY ${FIO_DIR}
)
add_custom_target(fio DEPENDS ${FIO_DIR}/fio)
else()
message("Fio not defined and will not build. You can specify fio dir by -DFIO_DIR=<fio_source_dir>")
endif()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。