]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
do_cmake.sh: update build type warning
authorMatan Breizman <mbreizma@redhat.com>
Sun, 23 Mar 2025 16:05:02 +0000 (16:05 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 8 May 2025 12:54:19 +0000 (12:54 +0000)
also, use printf instead of cat<<

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
do_cmake.sh

index a3775151712149253e3f22278121a52525d16af4..c31bdfe79169024608bcfba11b1979dd1623fd59 100755 (executable)
@@ -105,13 +105,20 @@ EOF
 echo done.
 
 if [[ ! "$ARGS $@" =~ "-DCMAKE_BUILD_TYPE" ]]; then
-  cat <<EOF
-
+    if [ -d ../.git ]; then
+        printf "
 ****
-WARNING: do_cmake.sh now creates debug builds by default. Performance
-may be severely affected. Please use -DCMAKE_BUILD_TYPE=RelWithDebInfo
+WARNING: do_cmake.sh now creates debug builds by default if .git exists.
+Performance may be severely affected. Please use -DCMAKE_BUILD_TYPE=RelWithDebInfo
 if a performance sensitive build is required.
 ****
-EOF
+"
+    else
+        printf "
+****
+WARNING: do_cmake.sh now creates RelWithDebInfo builds by default when .git is absent.
+****
+"
+    fi
 fi