diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-08-29 08:20:31 -0700 |
---|---|---|
committer | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-22 16:30:59 -0700 |
commit | 8f311f52037a9fb6a82d062342fec4b5396173c6 (patch) | |
tree | d20966972af4872d7b30dca1de41c1fc55f2decf /CMakeLists.txt | |
parent | 7be6be7dec00579cb7eaae32bed1217d6c35ee83 (diff) |
cmake: Add options for specifying install directories for dependencies.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e0d394e5..69f56f0bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,6 +161,20 @@ option(USE_LFSC "Use LFSC proof checker") option(USE_READLINE "Use readline for better interactive support") option(USE_SYMFPU "Use SymFPU for floating point support") +# Custom install directories for dependencies +# If no directory is provided by the user, we first check if the dependency was +# installed via the corresponding contrib/get-* script and if not found, we +# check the intalled system version. If the user provides a directory we +# immediately fail if the dependency was not found at the specified location. +set(ABC_DIR "" CACHE STRING "Set ABC install directory") +set(ANTLR_DIR "" CACHE STRING "Set ANTLR3 install directory") +set(CADICAL_DIR "" CACHE STRING "Set CaDiCaL install directory") +set(CRYPTOMINISAT_DIR "" CACHE STRING "Set CryptoMiniSat install directory") +set(GLPK_DIR "" CACHE STRING "Set GLPK install directory") +set(GMP_DIR "" CACHE STRING "Set GMP install directory") +set(LFSC_DIR "" CACHE STRING "Set LFSC install directory") +set(SYMFPU_DIR "" CACHE STRING "Set SymFPU install directory") + # Supported language bindings option(BUILD_BINDINGS_JAVA "Build Java bindings" OFF) option(BUILD_BINDINGS_PYTHON "Build Python bindings" OFF) @@ -190,8 +204,11 @@ set(CVC4_GPL_DEPS 0) #-----------------------------------------------------------------------------# find_package(PythonInterp REQUIRED) + +set(ANTLR_HOME ${ANTLR_DIR}) find_package(ANTLR REQUIRED) +set(GMP_HOME ${GMP_DIR}) find_package(GMP REQUIRED) cvc4_link_library(${GMP_LIBRARIES}) include_directories(${GMP_INCLUDE_DIR}) @@ -342,6 +359,7 @@ if(ENABLE_VALGRIND) endif() if(USE_ABC) + set(ABC_HOME "${ABC_DIR}") find_package(ABC REQUIRED) cvc4_link_library(${ABC_LIBRARIES}) include_directories(${ABC_INCLUDE_DIR}) @@ -349,6 +367,7 @@ if(USE_ABC) endif() if(USE_CADICAL) + set(CaDiCaL_HOME ${CADICAL_DIR}) find_package(CaDiCaL REQUIRED) cvc4_link_library(${CaDiCaL_LIBRARIES}) include_directories(${CaDiCaL_INCLUDE_DIR}) @@ -374,6 +393,7 @@ if(USE_CRYPTOMINISAT) if(THREADS_HAVE_PTHREAD_ARG) add_c_cxx_flag(-pthread) endif() + set(CryptoMiniSat_HOME ${CRYPTOMINISAT_DIR}) find_package(CryptoMiniSat REQUIRED) cvc4_link_library(${CryptoMiniSat_LIBRARIES}) include_directories(${CryptoMiniSat_INCLUDE_DIR}) @@ -382,6 +402,7 @@ endif() if(USE_GLPK) set(GPL_LIBS "${GPL_LIBS} glpk") + set(GLPK_HOME ${GLPK_DIR}) find_package(GLPK REQUIRED) cvc4_link_library(${GLPK_LIBRARIES}) include_directories(${GLPK_INCLUDE_DIR}) @@ -390,6 +411,7 @@ endif() if(USE_LFSC) set(RUN_REGRESSION_ARGS ${RUN_REGRESSION_ARGS} --with-lfsc) + set(LFSC_HOME ${LFSC_DIR}) find_package(LFSC REQUIRED) include_directories(${LFSC_INCLUDE_DIR}) add_definitions(-DCVC4_USE_LFSC) @@ -411,6 +433,7 @@ else() endif() if(USE_SYMFPU) + set(SymFPU_HOME ${SYMFPU_DIR}) find_package(SymFPU REQUIRED) include_directories(${SymFPU_INCLUDE_DIR}) add_definitions(-DCVC4_USE_SYMFPU) @@ -591,7 +614,7 @@ message("Portfolio : ${ENABLE_PORTFOLIO}") message("") message("ABC : ${USE_ABC}") message("CaDiCaL : ${USE_CADICAL}") -message("Cryptominisat : ${USE_CRYPTOMINISAT}") +message("CryptoMiniSat : ${USE_CRYPTOMINISAT}") message("GLPK : ${USE_GLPK}") message("LFSC : ${USE_LFSC}") #message("MP library : ${mplibrary}") |