From a4238dc5dbc7e9ec2f1a0eb9c6280969a6d45fef Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 22 Apr 2003 14:32:48 -0400 Subject: [PATCH] ENH: Add SGI -LANG:std support --- bootstrap | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/bootstrap b/bootstrap index 8992c0302..a0a85673a 100755 --- a/bootstrap +++ b/bootstrap @@ -27,6 +27,8 @@ CMAKE_SOURCES="\ cmVariableWatch \ cmSourceGroup" +cmake_system=`uname` + cmake_source_dir=`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'` cmake_source_dir=`(cd "${cmake_source_dir}";pwd)` cmake_binary_dir=`pwd` @@ -66,6 +68,7 @@ if [ -n "${cmake_verbose}" ]; then echo "Source directory: ${cmake_source_dir}" echo "Binary directory: ${cmake_binary_dir}" echo "Prefix directory: ${cmake_prefix_dir}" + echo "System: ${cmake_system}" fi echo "---------------------------------------------" @@ -257,6 +260,30 @@ rm -rf "${cmake_bootstrap_dir}/${TMPFILE}" echo "Make processor on this system is: ${cmake_make_processor}" # Test C++ compiler features + +if [ "x${cmake_system}" = "xIRIX64" ]; then + TMPFILE=`cmake_tmp_file` + cat>${TMPFILE}.cxx< + int main() { std::cout << "No need for -LANG:std" << 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 + 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" + else + echo "${cmake_cxx_compiler} does not need -LANG:std" + fi + rm -f "${TMPFILE}.cxx" +fi + if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" "${cmake_source_dir}/Modules/TestForSTDNamespace.cxx" >> cmake_bootstrap.log 2>&1; then cmake_report cmConfigure.h "/* #undef CMAKE_NO_STD_NAMESPACE */" echo "${cmake_cxx_compiler} has STD namespace"