summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2014-03-27 21:30:23 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-06 17:23:58 (GMT)
commitf347fd12f3d949b2c2e1db285f62ba71720af7ca (patch)
tree4ddf3712fc008fb778e5c958cb8e302c582469ec /bootstrap
parent4ca9b0086f4982f9bfc6e5f3e6265db84f95b616 (diff)
downloadCMake-f347fd12f3d949b2c2e1db285f62ba71720af7ca.zip
CMake-f347fd12f3d949b2c2e1db285f62ba71720af7ca.tar.gz
CMake-f347fd12f3d949b2c2e1db285f62ba71720af7ca.tar.bz2
CompileFlags: Add -AA +hpxstd98 on HP-UX 11.11 with aCC
These flags are needed to enable support for C++98. Also teach the 'bootstrap' script to add them if necessary.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap25
1 files changed, 24 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index 69dcbce..45f67cf 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1085,8 +1085,8 @@ if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
cmake_test_flags=
# If we are on HP-UX, check for -Ae for the C compiler.
- cmake_test_flags="-Ae"
if [ "x${cmake_system}" = "xHP-UX" ]; then
+ cmake_test_flags="-Ae"
TMPFILE=`cmake_tmp_file`
echo '
int main(int argc, char** argv) { (void)argc; (void)argv; return 0; }
@@ -1107,6 +1107,29 @@ if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
echo "${cmake_c_compiler} does not need ${cmake_test_flags}"
fi
rm -f "${TMPFILE}.c"
+ echo '
+ #include <iostream>
+ int main(int argc, char** argv) {
+ for(int i=0; i < 1; ++i);
+ for(int i=0; i < 1; ++i);
+ (void)argc; (void)argv; return 0; }
+' > ${TMPFILE}.cxx
+ cmake_need_AAstd98=0
+ cmake_test_flags="-AA +hpxstd98"
+ 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} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
+ cmake_need_AAstd98=1
+ fi
+ fi
+ if [ "x${cmake_need_AAstd98}" = "x1" ]; then
+ cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
+ echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
+ else
+ echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
+ fi
fi
cmake_test_flags=
fi