summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-06-26 13:44:27 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-06-26 13:44:27 (GMT)
commit9754503095b7150b5cd19009b8c166887c9fdfdb (patch)
tree59b03ee05567ddcdd1f6ee2b5dbf11f614de37b0 /bootstrap
parenta778cd0f3df4a0fad4d352356793d0beb21c4ece (diff)
downloadCMake-9754503095b7150b5cd19009b8c166887c9fdfdb.zip
CMake-9754503095b7150b5cd19009b8c166887c9fdfdb.tar.gz
CMake-9754503095b7150b5cd19009b8c166887c9fdfdb.tar.bz2
ENH: Attempt to handle OSF compiler flags
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap60
1 files changed, 55 insertions, 5 deletions
diff --git a/bootstrap b/bootstrap
index 3426273..f4e70a7 100755
--- a/bootstrap
+++ b/bootstrap
@@ -391,28 +391,78 @@ echo "Make processor on this system is: ${cmake_make_processor}"
# Test C++ compiler features
# If we are on IRIX, check for -LANG:std
+cmake_test_flags="-LANG:std"
if [ "x${cmake_system}" = "xIRIX64" ]; then
TMPFILE=`cmake_tmp_file`
cat>${TMPFILE}.cxx<<EOF
#include <iostream>
- int main() { std::cout << "No need for -LANG:std" << std::endl; return 0;}
+ int main() { std::cout << "No need for ${cmake_test_flags}" << std::endl; return 0;}
EOF
cmake_need_lang_std=0
if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
:
else
- if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags} -LANG:std" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
+ if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
cmake_need_lang_std=1
fi
fi
if [ "x${cmake_need_lang_std}" = "x1" ]; then
- cmake_cxx_flags="${cmake_cxx_flags} -LANG:std"
- echo "${cmake_cxx_compiler} needs -LANG:std"
+ cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
+ echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
else
- echo "${cmake_cxx_compiler} does not need -LANG:std"
+ echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
fi
rm -f "${TMPFILE}.cxx"
fi
+cmake_test_flags=
+
+# If we are on OSF, check for -timplicit_local -no_implicit_include
+cmake_test_flags="-timplicit_local -no_implicit_include"
+if [ "x${cmake_system}" = "xOSF1" ]; then
+ TMPFILE=`cmake_tmp_file`
+ cat>${TMPFILE}.cxx<<EOF
+ #include <iostream>
+ int main() { std::cout << "We need ${cmake_test_flags}" << std::endl; return 0;}
+EOF
+ cmake_need_flags=1
+ if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
+ :
+ else
+ cmake_need_flags=0
+ fi
+ if [ "x${cmake_need_flags}" = "x1" ]; then
+ cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
+ echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
+ else
+ echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
+ fi
+ rm -f "${TMPFILE}.cxx"
+fi
+cmake_test_flags=
+
+# If we are on OSF, check for -std strict_ansi -nopure_cname
+cmake_test_flags="-std strict_ansi -nopure_cname"
+if [ "x${cmake_system}" = "xOSF1" ]; then
+ TMPFILE=`cmake_tmp_file`
+ cat>${TMPFILE}.cxx<<EOF
+ #include <iostream>
+ int main() { std::cout << "We need ${cmake_test_flags}" << std::endl; return 0;}
+EOF
+ cmake_need_flags=1
+ if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
+ :
+ else
+ cmake_need_flags=0
+ fi
+ if [ "x${cmake_need_flags}" = "x1" ]; then
+ cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
+ echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
+ else
+ echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
+ fi
+ rm -f "${TMPFILE}.cxx"
+fi
+cmake_test_flags=
# Just to be safe, let us store compiler and flags to the header file