mirror of
https://github.com/ceph/ceph
synced 2025-01-22 11:05:02 +00:00
47b76ce24e
git complains when checking out a tag in "detached HEAD", like: You are in 'detached HEAD' state. You can look around, make experimental changes and commit them ... but this does not help, as, in general, we don't hack fio in Ceph, so disable this warning. and also clone the repo in shallow mode for the same reason -- we don't care about the whole history of fio repo. we just use it for testing. Signed-off-by: Kefu Chai <kchai@redhat.com>
21 lines
788 B
CMake
21 lines
788 B
CMake
function(build_fio)
|
|
# we use an external project and copy the sources to bin directory to ensure
|
|
# that object files are built outside of the source tree.
|
|
include(ExternalProject)
|
|
if(ALLOCATOR)
|
|
set(FIO_EXTLIBS EXTLIBS=-l${ALLOCATOR})
|
|
endif()
|
|
ExternalProject_Add(fio_ext
|
|
DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/
|
|
UPDATE_COMMAND "" # this disables rebuild on each run
|
|
GIT_REPOSITORY "https://github.com/axboe/fio.git"
|
|
GIT_CONFIG advice.detachedHead=false
|
|
GIT_SHALLOW 1
|
|
GIT_TAG "fio-3.15"
|
|
SOURCE_DIR ${CMAKE_BINARY_DIR}/src/fio
|
|
BUILD_IN_SOURCE 1
|
|
CONFIGURE_COMMAND <SOURCE_DIR>/configure
|
|
BUILD_COMMAND $(MAKE) fio EXTFLAGS=-Wno-format-truncation ${FIO_EXTLIBS}
|
|
INSTALL_COMMAND cp <BINARY_DIR>/fio ${CMAKE_BINARY_DIR}/bin)
|
|
endfunction()
|