]> 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:55:04 +0000 (12:55 +0000)
also, use printf instead of cat<<

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit fc7597df316b536e32379a6a67629e2f8293467a)

do_cmake.sh

index 2f5c5ee5bd477a7d0ad9129b537448e6ed5e89d2..8ccb986c97edad6124be99f060221a325444f45b 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