This commit changes the contrib/get-cryptominisat script to only build
the CryptoMiniSat library instead of both the library and the binary.
The advantage of this is that we can compile a static version of the
CryptoMiniSat library without having a static version of glibc or
libstdc++ (this is fine as long as we do a shared library build of
CVC4). This is an issue on Fedora (tested on version 25) where the
contrib/get-cryptominisat script was failing when building the
CryptoMiniSat binary due to the static version of these libraries not
being available. Since we just want to build the library, the commit
also changes the script to not install CryptoMiniSat anymore and updates
the CMake find script to accomodate the new folder structure. Side note:
the folder structure generated after this commit is a bit more uniform
with, e.g. the CaDiCaL script: The source files are directly in the
cryptominisat5 folder, not in a subfolder.
# If the user provides a directory we will not search the default paths and
# fail if CryptoMiniSat was not found in the specified directory.
if(NOT CryptoMiniSat_HOME)
- set(CryptoMiniSat_HOME ${PROJECT_SOURCE_DIR}/cryptominisat5/install)
+ set(CryptoMiniSat_HOME ${PROJECT_SOURCE_DIR}/cryptominisat5/build)
set(CHECK_SYSTEM_VERSION TRUE)
endif()
find_path(CryptoMiniSat_INCLUDE_DIR
NAMES cryptominisat5/cryptominisat.h
- PATHS ${CryptoMiniSat_HOME}/include
+ PATHS ${CryptoMiniSat_HOME}/include ${CryptoMiniSat_HOME}/cmsat5-src
NO_DEFAULT_PATH)
find_library(CryptoMiniSat_LIBRARIES
NAMES cryptominisat5
version="5.6.3"
-mkdir cryptominisat5
-cd cryptominisat5
-CRYPTOMINISAT_PATH=`pwd`
-
webget https://github.com/msoos/cryptominisat/archive/$version.tar.gz cryptominisat-$version.tar.gz
-gunzip -f cryptominisat-$version.tar.gz
-tar xfv cryptominisat-$version.tar
-cd cryptominisat-$version
+tar xfvz cryptominisat-$version.tar.gz
+rm cryptominisat-$version.tar.gz
+mv cryptominisat-$version cryptominisat5
-mkdir ../build
-cd ../build
+cd cryptominisat5
+mkdir build
+cd build
cmake -DENABLE_PYTHON_INTERFACE=OFF \
- -DCMAKE_INSTALL_PREFIX:PATH=$CRYPTOMINISAT_PATH/install \
-DSTATICCOMPILE=ON \
-DNOM4RI=ON \
- ../cryptominisat-$version
-
-make install -j$(nproc)
+ ..
-cd ../
+make libcryptominisat5 -j$(nproc)
echo
echo ===================== Now configure CVC4 with =====================