From: Kefu Chai Date: Tue, 25 Aug 2020 04:34:15 +0000 (+0800) Subject: cmake: silence "detached HEAD" warning X-Git-Tag: v16.1.0~1340^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F36778%2Fhead;p=ceph.git 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 --- 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