Skip to content
Snippets Groups Projects
Commit a4238dc5 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

ENH: Add SGI -LANG:std support

parent 05e04379
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment