ENH: Add SGI -LANG:std support

This commit is contained in:
Andy Cedilnik 2003-04-22 14:32:48 -04:00
parent 05e0437943
commit a4238dc5db
1 changed files with 27 additions and 0 deletions

View File

@ -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<<EOF
#include <iostream>
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"