summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-09-19 16:36:22 -0700
committerMathias Preiner <mathias.preiner@gmail.com>2018-09-22 16:30:59 -0700
commite3731aaf37d048194fea4b6255818a9f5d3a4ed2 (patch)
tree6f5c2a807f21709431832b843717a6b95e25eaa1
parent1b77e124cc4d2a66b3be60529ed3714731b6f8a4 (diff)
cmake: configure wrapper: Modify next steps message after configuration.
Since configure.sh is only a wrapper for cmake it prints all the messages from cmake. At the end we print the next steps after configuration. If configure.sh is used we add the info to also change into the build directory before calling make.
-rwxr-xr-xconfigure.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/configure.sh b/configure.sh
index 52c280a56..98f39779e 100755
--- a/configure.sh
+++ b/configure.sh
@@ -442,22 +442,27 @@ if [ -n "$build_name" ]; then
[ $win64 = ON ] && [ -e "$build_dir" ] && rm -r "$build_dir"
mkdir -p "$build_name"
else
+ default_builds_dir="cmake-builds"
+ current_build_dir="$default_builds_dir/build"
+
# If no build name is specified create 'cmake-builds' directory and create
# the current build directory. Set symlink 'cmake-builds/build/' to current
# build.
- build_dir="$build_prefix$build_dir"
+ build_dir="$default_builds_dir/$build_prefix$build_dir"
# The cmake toolchain can't be changed once it is configured in $build_dir.
# Thus, remove $build_dir and create an empty directory.
- [ $win64 = ON ] && [ -e "cmake-build/$build_dir" ] \
- && rm -r "cmake-builds/$build_dir"
- mkdir -p "cmake-builds/$build_dir"
- cd cmake-builds || exit 1
- [ -e build ] && rm build
- ln -s "$build_dir" build # link to current build directory
+ [ $win64 = ON ] && [ -e "$build_dir" ] && rm -r "$build_dir"
+
+ # Create build directory and symlink to it
+ mkdir -p "$build_dir"
+ [ -L $current_build_dir ] && rm "$current_build_dir"
+ ln -s "$root_dir/$build_dir" "$current_build_dir"
fi
cd "$build_dir" || exit 1
[ -e CMakeCache.txt ] && rm CMakeCache.txt
-cmake "$root_dir" $cmake_opts
+build_dir_escaped=$(echo "$build_dir" | sed 's/\//\\\//g')
+cmake "$root_dir" $cmake_opts 2>&1 | \
+ sed "s/^Now just/Now change to '$build_dir_escaped' and/"
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback