diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-23 15:21:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-23 15:21:15 +0200 |
commit | 90b0c577bc2f368b62e05211062af72d15f0d5c4 (patch) | |
tree | 4247adb3bac79901894114574a579a87cff2cac3 /build/cxx/intel | |
parent | 7dbc1fda18fef05d3c5a8008c54ee5cd871633b8 (diff) |
Add support for detecting C++ standard
Diffstat (limited to 'build/cxx/intel')
-rwxr-xr-x | build/cxx/intel/configure | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build/cxx/intel/configure b/build/cxx/intel/configure index d044cab..7f79dd8 100755 --- a/build/cxx/intel/configure +++ b/build/cxx/intel/configure @@ -29,6 +29,19 @@ $echo cxx_intel=`read_path --command icpc` +# Determine the C++ standard. Intel C++ on GNU/Linux appears to use the +# same option and values as GCC. +# +cxx_intel_standard=`echo "$3" | sed -e 's/.*-std=\([^ ]*\).*/\1/' -e t -e d` + +if [ -z "$cxx_intel_standard" ]; then + cxx_intel_standard="gnu++98" +elif [ "$cxx_intel_standard" = "c++0x" ]; then + cxx_intel_standard="c++11" +elif [ "$cxx_intel_standard" = "gnu++0x" ]; then + cxx_intel_standard="gnu++11" +fi + # Pass cxx_extra_options and cxx_ld_extra_options since those # can affect the search paths (e.g., -m32). # |