diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-04-22 18:32:48 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-04-22 18:32:48 (GMT) |
commit | a4238dc5dbc7e9ec2f1a0eb9c6280969a6d45fef (patch) | |
tree | a8eaa7a3e87ab1ce972db000310f57a6b4c22f2e /bootstrap | |
parent | 05e04379430faa6bc6d6a4ed3d878a89a807eb05 (diff) | |
download | CMake-a4238dc5dbc7e9ec2f1a0eb9c6280969a6d45fef.zip CMake-a4238dc5dbc7e9ec2f1a0eb9c6280969a6d45fef.tar.gz CMake-a4238dc5dbc7e9ec2f1a0eb9c6280969a6d45fef.tar.bz2 |
ENH: Add SGI -LANG:std support
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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" |