aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-08-08 22:31:17 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-08-09 01:02:59 +0800
commit9b4546c487bc59e790716a11531e660110ca81e9 (patch)
treee3e4cefaac9e53dd494f021eaaab5e15e6b87941 /libsolidity
parent551343ae3eb1b3f1575d91a4f7021c0f9529d5bd (diff)
downloaddexon-solidity-9b4546c487bc59e790716a11531e660110ca81e9.tar.gz
dexon-solidity-9b4546c487bc59e790716a11531e660110ca81e9.tar.zst
dexon-solidity-9b4546c487bc59e790716a11531e660110ca81e9.zip
Add workarounds for building against CVC4 on ArchLinux.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/CMakeLists.txt2
-rw-r--r--libsolidity/formal/CVC4Interface.h11
2 files changed, 12 insertions, 1 deletions
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt
index 49095fff..872504f3 100644
--- a/libsolidity/CMakeLists.txt
+++ b/libsolidity/CMakeLists.txt
@@ -39,6 +39,6 @@ if (${Z3_FOUND})
endif()
if (${CVC4_FOUND} AND ${GMP_FOUND})
- target_link_libraries(solidity PUBLIC ${CVC4_LIBRARY})
+ target_link_libraries(solidity PUBLIC ${CVC4_LIBRARIES})
target_link_libraries(solidity PUBLIC ${GMP_LIBRARY})
endif()
diff --git a/libsolidity/formal/CVC4Interface.h b/libsolidity/formal/CVC4Interface.h
index dcd87525..cd6d761d 100644
--- a/libsolidity/formal/CVC4Interface.h
+++ b/libsolidity/formal/CVC4Interface.h
@@ -21,8 +21,19 @@
#include <boost/noncopyable.hpp>
+#if defined(__GLIBC__)
+// The CVC4 headers includes the deprecated system headers <ext/hash_map>
+// and <ext/hash_set>. These headers cause a warning that will break the
+// build, unless _GLIBCXX_PERMIT_BACKWARD_HASH is set.
+#define _GLIBCXX_PERMIT_BACKWARD_HASH
+#endif
+
#include <cvc4/cvc4.h>
+#if defined(__GLIBC__)
+#undef _GLIBCXX_PERMIT_BACKWARD_HASH
+#endif
+
namespace dev
{
namespace solidity