From 47b76ce24e8241b535c76c57dec8daf98495446f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 25 Aug 2020 12:34:15 +0800 Subject: [PATCH] cmake: silence "detached HEAD" warning 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 --- cmake/modules/BuildFIO.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/BuildFIO.cmake b/cmake/modules/BuildFIO.cmake index 28e7ebfca774..9c4d2ddfe27c 100644 --- a/cmake/modules/BuildFIO.cmake +++ b/cmake/modules/BuildFIO.cmake @@ -9,6 +9,8 @@ function(build_fio) 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 -- 2.47.3