From: Andres Noetzli Date: Mon, 22 Oct 2018 22:16:00 +0000 (-0700) Subject: Only build CryptoMiniSat library, no binary (#2657) X-Git-Tag: cvc5-1.0.0~4391 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5cdd2d16670725e29b1f43510fc5246e9c861fe3;p=cvc5.git Only build CryptoMiniSat library, no binary (#2657) 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. --- diff --git a/cmake/FindCryptoMiniSat.cmake b/cmake/FindCryptoMiniSat.cmake index 7806b242d..d96c54eb3 100644 --- a/cmake/FindCryptoMiniSat.cmake +++ b/cmake/FindCryptoMiniSat.cmake @@ -8,13 +8,13 @@ # 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 diff --git a/contrib/get-cryptominisat b/contrib/get-cryptominisat index 39fc22044..6b3a7029a 100755 --- a/contrib/get-cryptominisat +++ b/contrib/get-cryptominisat @@ -9,27 +9,21 @@ fi 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 =====================