summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-08-22 13:52:05 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-08-22 13:52:05 (GMT)
commit21ec23413e1bc722f2ede890c0afff01fbe6bbcf (patch)
treeaf4a83e6c67c79692fa9fbf0662c02a82b8260fd /bootstrap
parenta413160fecc73bf61fccff9b74d6e18349eeb861 (diff)
downloadCMake-21ec23413e1bc722f2ede890c0afff01fbe6bbcf.zip
CMake-21ec23413e1bc722f2ede890c0afff01fbe6bbcf.tar.gz
CMake-21ec23413e1bc722f2ede890c0afff01fbe6bbcf.tar.bz2
ERR: Reorganize to try to fix the -pthread problem on some systems
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap18
1 files changed, 12 insertions, 6 deletions
diff --git a/bootstrap b/bootstrap
index 8e793bd..3403929 100755
--- a/bootstrap
+++ b/bootstrap
@@ -218,12 +218,14 @@ cmake_try_run ()
# Run a make test. First argument is the make interpreter.
cmake_try_make ()
{
- MAKE_PROC=$1
+ MAKE_PROC="$1"
+ MAKE_FLAGS="$2"
echo "Try: ${MAKE_PROC}"
- ${MAKE_PROC}
+ "${MAKE_PROC}" ${MAKE_FLAGS}
RES=$?
if [ "${RES}" -ne "0" ]; then
- echo "${MAKE_PROC} does not work";return 1
+ echo "${MAKE_PROC} does not work"
+ return 1
fi
if [ ! -f "test" ] && [ ! -f "test.exe" ]; then
echo "${COMPILER} does not produce output"
@@ -397,6 +399,7 @@ echo "C++ compiler on this system is: ${cmake_cxx_compiler} ${cmake_cxx_flags}"
# Test Make
cmake_make_processor=
+cmake_make_flags=
# If MAKE is set, use that for make processor, otherwise use list of known make
if [ -n "${MAKE}" ]; then
@@ -411,14 +414,17 @@ mkdir "${cmake_bootstrap_dir}/${TMPFILE}"
cd "${cmake_bootstrap_dir}/${TMPFILE}"
cat>"Makefile"<<EOF
test: test.c
- ${cmake_c_compiler} -o test test.c
+ "${cmake_c_compiler}" -o test test.c
EOF
cat>"test.c"<<EOF
#include <stdio.h>
int main(){ printf("1\n"); return 0; }
EOF
+if [ "x${cmake_parallel_make}" != "x" ]; then
+ cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
+fi
for a in ${cmake_make_processors}; do
- if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" >> cmake_bootstrap.log 2>&1; then
+ if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> cmake_bootstrap.log 2>&1; then
cmake_make_processor="${a}"
fi
done
@@ -680,7 +686,7 @@ echo "---------------------------------------------"
# Run make to build bootstrap cmake
if [ "x${cmake_parallel_make}" != "x" ]; then
- ${cmake_make_processor} -j ${cmake_parallel_make}
+ ${cmake_make_processor} ${cmake_make_flags}
else
${cmake_make_processor}
fi