]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
do_cmake.sh: enable ccache if installed 15274/head
authorSage Weil <sage@redhat.com>
Thu, 1 Jun 2017 16:25:11 +0000 (12:25 -0400)
committerSage Weil <sage@redhat.com>
Thu, 1 Jun 2017 16:25:11 +0000 (12:25 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
do_cmake.sh

index 2e9de99e9729e93ef12b393487b0f3a26ee2f432..9b04cb114f6eecdf5fb24ea243261301cdc177ab 100755 (executable)
@@ -4,9 +4,16 @@ if test -e build; then
     echo 'build dir already exists; rm -rf build and re-run'
     exit 1
 fi
+
+ARGS=""
+if which ccache ; then
+    echo "enabling ccache"
+    ARGS+="-DWITH_CCACHE=ON"
+fi
+
 mkdir build
 cd build
-cmake -DBOOST_J=$(nproc) "$@" ..
+cmake -DBOOST_J=$(nproc) $ARGS "$@" ..
 
 # minimal config to find plugins
 cat <<EOF > ceph.conf