diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-05-17 19:16:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-17 19:16:55 -0700 |
commit | 521701398b15bd41a1cb8a9b530fc4af4892c7af (patch) | |
tree | 49a987b7ff99cead47b0881dbf55af8425120d31 /cmake | |
parent | d7514f640835ba6e7c8c4db4fa6fd041bbf0fe3c (diff) |
Support for incremental bit-blasting with CaDiCaL (#3006)
This commit adds support for eager bit-blasting with CaDiCaL on
incremental benchmarks. Since not all CaDiCaL versions support
incremental solving, the commit adds a CMake check that checks whether
`CaDiCaL::Solver::assume()` exists.
Note: The check uses `check_cxx_source_compiles`, which is not very
elegant but I could not find a better solution (e.g.
`check_cxx_symbol_exists()` does not seem to support methods in classes
and `check_struct_has_member()` only seems to support data members).
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ConfigureCVC4.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/ConfigureCVC4.cmake b/cmake/ConfigureCVC4.cmake index 67c1f414d..cdf8e4d9a 100644 --- a/cmake/ConfigureCVC4.cmake +++ b/cmake/ConfigureCVC4.cmake @@ -67,6 +67,20 @@ check_symbol_exists(sigaltstack "signal.h" HAVE_SIGALTSTACK) check_symbol_exists(strerror_r "string.h" HAVE_STRERROR_R) check_symbol_exists(strtok_r "string.h" HAVE_STRTOK_R) +# Check whether the verison of CaDiCaL used supports incremental solving +if(USE_CADICAL) + check_cxx_source_compiles( + " + #include <${CaDiCaL_HOME}/src/cadical.hpp> + int main() { return sizeof(&CaDiCaL::Solver::assume); } + " + CVC4_INCREMENTAL_CADICAL + ) + if(CVC4_INCREMENTAL_CADICAL) + add_definitions(-DCVC4_INCREMENTAL_CADICAL) + endif() +endif() + # Determine if we have the POSIX (int) or GNU (char *) variant of strerror_r. check_c_source_compiles( " |