summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-05-14 09:27:39 -0400
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-05-14 09:27:39 -0400
commit5e548d41d3a6f77b420f26103a1a82f6be27793c (patch)
treef2ea5a0387239ea5439264c772badcbb56fb181f /bootstrap
parentdf7ae80a21aca856ac2f08780380177762aceaed (diff)
downloadcmake-5e548d41d3a6f77b420f26103a1a82f6be27793c.tar.gz
ENH: Add parallel build support, fix bug in verbose and clean output when adding arguments
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap20
1 files changed, 16 insertions, 4 deletions
diff --git a/bootstrap b/bootstrap
index ff5bb1ae37..38a804130c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -141,15 +141,19 @@ cmake_try_make ()
}
cmake_verbose=
+cmake_parallel_make=
cmake_prefix_dir="/usr/local"
for a in "$@"; do
- if echo $a | grep "^--prefix="; then
+ if echo $a | grep "^--prefix=" > /dev/null 2> /dev/null; then
cmake_prefix_dir=`echo $a | sed "s/^--prefix=//"`
fi
- if echo $a | grep "^--help"; then
+ if echo $a | grep "^--parallel=" > /dev/null 2> /dev/null; then
+ cmake_parallel_make=`echo $a | sed "s/^--parallel=//" | grep "[0-9][0-9]*"`
+ fi
+ if echo $a | grep "^--help" > /dev/null 2> /dev/null; then
cmake_usage
fi
- if echo $a | grep "^--verbose"; then
+ if echo $a | grep "^--verbose" > /dev/null 2> /dev/null; then
cmake_verbose=TRUE
fi
done
@@ -160,6 +164,10 @@ if [ -n "${cmake_verbose}" ]; then
echo "Binary directory: ${cmake_binary_dir}"
echo "Prefix directory: ${cmake_prefix_dir}"
echo "System: ${cmake_system}"
+ if [ "x${cmake_parallel_make}" != "x" ]; then
+ echo "Doing parallel make: ${cmake_parallel_make}"
+ fi
+ echo ""
fi
echo "---------------------------------------------"
@@ -359,7 +367,11 @@ echo "SET (CMAKE_CONFIGURE_INSTALL_PREFIX \"${cmake_prefix_dir}\" CACHE PATH \"I
echo "---------------------------------------------"
-${cmake_make_processor}
+if [ "x${cmake_parallel_make}" != "x" ]; then
+ ${cmake_make_processor} -j ${cmake_parallel_make}
+else
+ ${cmake_make_processor}
+fi
RES=$?
if [ "${RES}" -ne "0" ]; then
cmake_error "Problem while bootstrapping CMake"