summaryrefslogtreecommitdiff
path: root/cmake/FindCaDiCaL.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindCaDiCaL.cmake')
-rw-r--r--cmake/FindCaDiCaL.cmake21
1 files changed, 12 insertions, 9 deletions
diff --git a/cmake/FindCaDiCaL.cmake b/cmake/FindCaDiCaL.cmake
index 80fa2e4ec..ce70c5292 100644
--- a/cmake/FindCaDiCaL.cmake
+++ b/cmake/FindCaDiCaL.cmake
@@ -47,9 +47,7 @@ if(NOT CaDiCaL_FOUND_SYSTEM)
include(CheckSymbolExists)
include(ExternalProject)
- fail_if_include_missing("sys/resource.h" "CaDiCaL")
-
- set(CaDiCaL_VERSION "88623ef0866370448c34f6e320c148fc18e6f4cc")
+ set(CaDiCaL_VERSION "rel-1.4.1")
# avoid configure script and instantiate the makefile manually the configure
# scripts unnecessarily fails for cross compilation thus we do the bare
@@ -74,7 +72,7 @@ if(NOT CaDiCaL_FOUND_SYSTEM)
${COMMON_EP_CONFIG}
BUILD_IN_SOURCE ON
URL https://github.com/arminbiere/cadical/archive/${CaDiCaL_VERSION}.tar.gz
- URL_HASH SHA1=16ea51f0274d699f3d3c9e3be7083179eed83abf
+ URL_HASH SHA1=ad3be225f20e5c5b3883290478282698624c14a5
CONFIGURE_COMMAND mkdir -p <SOURCE_DIR>/build
# avoid configure script, prepare the makefile manually
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/makefile.in
@@ -83,11 +81,6 @@ if(NOT CaDiCaL_FOUND_SYSTEM)
sed -i.orig -e "s,@CXX@,${CMAKE_CXX_COMPILER}," -e
"s,@CXXFLAGS@,${CXXFLAGS}," -e "s,@MAKEFLAGS@,,"
<SOURCE_DIR>/build/makefile
- # This is a temporary patch until fixed upstream
- PATCH_COMMAND
- sed -i.orig
- "s,#include <vector>,#include <vector>\\\\n#include <cstddef>,"
- <SOURCE_DIR>/src/reap.hpp
BUILD_COMMAND ${make_cmd} -C <SOURCE_DIR>/build libcadical.a
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/build/libcadical.a
<INSTALL_DIR>/lib/libcadical.a
@@ -110,6 +103,16 @@ set_target_properties(
CaDiCaL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CaDiCaL_INCLUDE_DIR}"
)
+if (WIN32)
+ # The Windows version of CaDiCaL calls GetProcessMemoryInfo(), which is
+ # defined in the Process Status API (psapi), so we declare it as a dependency
+ # of the CaDiCaL library (without this, linking a static cvc5 executable
+ # fails).
+ set_target_properties(
+ CaDiCaL PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES psapi
+ )
+endif ()
+
mark_as_advanced(CaDiCaL_FOUND)
mark_as_advanced(CaDiCaL_FOUND_SYSTEM)
mark_as_advanced(CaDiCaL_INCLUDE_DIR)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback