]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: silence "detached HEAD" warning 36778/head
authorKefu Chai <kchai@redhat.com>
Tue, 25 Aug 2020 04:34:15 +0000 (12:34 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 25 Aug 2020 04:38:03 +0000 (12:38 +0800)
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>
cmake/modules/BuildFIO.cmake

index 28e7ebfca774793c1a3bfe9d9aa0f7a149f6c408..9c4d2ddfe27cd420ff4f0ec172453ad2b3b0b8ce 100644 (file)
@@ -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