#-----------------------------------------------------------------------------#
option(ENABLE_PROOFS "Enable proof support" OFF)
+option(USE_CADICAL "Use CaDiCaL SAT solver" OFF)
option(USE_CLN "Use CLN instead of GMP" OFF)
option(USE_CRYPTOMINISAT "Use CryptoMiniSat SAT solver" OFF)
option(USE_SYMFPU "Use SymFPU for floating point support" OFF)
cvc4_link_library(${GMP_LIBRARIES})
include_directories(${GMP_INCLUDE_DIR})
+if(ENABLE_PROOFS)
+ add_definitions(-DCVC4_PROOF)
+endif()
+
+if(USE_CADICAL)
+ find_package(CaDiCaL REQUIRED)
+ cvc4_link_library(${CaDiCaL_LIBRARIES})
+ include_directories(${CaDiCaL_INCLUDE_DIR})
+ add_definitions(-DCVC4_USE_CADICAL)
+endif()
+
if(USE_CLN)
find_package(CLN 1.2.2 REQUIRED)
cvc4_link_library(${CLN_LIBRARIES})
include_directories(${CLN_INCLUDE_DIR})
+ set(CVC4_USE_CLN_IMP 1)
+ set(CVC4_USE_GMP_IMP 0)
+else()
+ set(CVC4_USE_CLN_IMP 0)
+ set(CVC4_USE_GMP_IMP 1)
endif()
if(USE_CRYPTOMINISAT)
find_package(CryptoMiniSat REQUIRED)
cvc4_link_library(${CryptoMiniSat_LIBRARIES})
include_directories(${CryptoMiniSat_INCLUDE_DIR})
+ add_definitions(-DCVC4_USE_CRYPTOMINISAT)
endif()
if(USE_SYMFPU)
find_package(SymFPU REQUIRED)
include_directories(${SymFPU_INCLUDE_DIR})
+ add_definitions(-DCVC4_USE_SYMFPU)
+ set(CVC4_USE_SYMFPU 1)
+else()
+ set(CVC4_USE_SYMFPU 0)
endif()
#-----------------------------------------------------------------------------#
configure_file(cvc4autoconfig.new.h.in cvc4autoconfig.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-if(USE_CLN)
- set(CVC4_USE_CLN_IMP 1)
- set(CVC4_USE_GMP_IMP 0)
-else()
- set(CVC4_USE_CLN_IMP 0)
- set(CVC4_USE_GMP_IMP 1)
-endif()
-
-if(USE_CRYPTOMINISAT)
- add_definitions(-DCVC4_USE_CRYPTOMINISAT)
-endif()
-
-if(USE_SYMFPU)
- add_definitions(-DCVC4_USE_SYMFPU)
- set(CVC4_USE_SYMFPU 1)
-else()
- set(CVC4_USE_SYMFPU 0)
-endif()
-
-if(ENABLE_PROOFS)
- add_definitions(-DCVC4_PROOF)
-endif()
-
#-----------------------------------------------------------------------------#
add_subdirectory(doc)
--- /dev/null
+# Find CaDiCaL
+# CaDiCaL_FOUND - system has CaDiCaL lib
+# CaDiCaL_INCLUDE_DIR - the CaDiCaL include directory
+# CaDiCaL_LIBRARIES - Libraries needed to use CaDiCaL
+
+find_path(CaDiCaL_INCLUDE_DIR
+ NAMES cadical.hpp
+ PATHS "${PROJECT_SOURCE_DIR}/cadical/src")
+find_library(CaDiCaL_LIBRARIES
+ NAMES cadical
+ PATHS "${PROJECT_SOURCE_DIR}/cadical/build")
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CaDiCaL
+ DEFAULT_MSG
+ CaDiCaL_INCLUDE_DIR CaDiCaL_LIBRARIES)
+
+mark_as_advanced(CaDiCaL_INCLUDE_DIR CaDiCaL_LIBRARIES)