diff options
author | Clark Barrett <barrett@cs.stanford.edu> | 2017-04-21 09:43:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-21 09:43:50 -0700 |
commit | 23e5362ba8d356b72ba8b488278327cf43c59f66 (patch) | |
tree | d68b021bb287a212d1a552daea39405ae26f4d33 | |
parent | ff78fc50f1617da77b185d62f4018b9312866801 (diff) | |
parent | 2a26e0be7238cb055f0e121df050ea1e342a2fa2 (diff) |
Merge pull request #150 from 4tXJ7f/check_exceptions2
Add check for C++ exceptions to config script
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d2c08661b..7da86d8a8 100644 --- a/configure.ac +++ b/configure.ac @@ -253,6 +253,27 @@ AC_PROG_INSTALL CVC4_GCC_VERSION +if test $cross_compiling = "no"; then + AC_MSG_CHECKING([whether C++ exceptions work]) + AC_LANG_PUSH([C++]) + AC_RUN_IFELSE( + AC_LANG_PROGRAM([#include <exception>], [[ + int result = 1; + try { + throw std::exception(); + } catch (...) { + result = 0; + } + return result; + ]]), + [AC_MSG_RESULT([yes])], + [AC_MSG_ERROR([C++ exceptions do not work.])] + ) + AC_LANG_POP([C++]) +else + AC_MSG_WARN([Cross compiling, cannot check whether exceptions work]) +fi + cvc4_use_gmp=2 cvc4_use_cln=2 |