diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2019-12-06 06:48:04 -0800 |
---|---|---|
committer | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-12-06 08:48:04 -0600 |
commit | 008d6b51baec353f45324e1d9407d898866cf688 (patch) | |
tree | 136e5c1dcbfb32f1fed99b853b79c2f7ecc6b5d2 /cmake | |
parent | 46bae5d2a8b22867f917c6f644e46e29884049f9 (diff) |
contrib: Setup all dependencies in deps/ directory. (#3534)
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindABC.cmake | 26 | ||||
-rw-r--r-- | cmake/FindANTLR.cmake | 30 | ||||
-rw-r--r-- | cmake/FindCaDiCaL.cmake | 24 | ||||
-rw-r--r-- | cmake/FindCryptoMiniSat.cmake | 23 | ||||
-rw-r--r-- | cmake/FindDrat2Er.cmake | 23 | ||||
-rw-r--r-- | cmake/FindGLPK.cmake | 23 | ||||
-rw-r--r-- | cmake/FindGMP.cmake | 24 | ||||
-rw-r--r-- | cmake/FindLFSC.cmake | 24 | ||||
-rw-r--r-- | cmake/FindSymFPU.cmake | 18 |
9 files changed, 23 insertions, 192 deletions
diff --git a/cmake/FindABC.cmake b/cmake/FindABC.cmake index c44019739..a6f182654 100644 --- a/cmake/FindABC.cmake +++ b/cmake/FindABC.cmake @@ -4,26 +4,12 @@ # ABC_LIBRARIES - Libraries needed to use ABC # ABC_ARCH_FLAGS - Platform specific compile flags - -# Check default location of ABC built with contrib/get-abc. -if(NOT ABC_HOME) - set(ABC_HOME ${PROJECT_SOURCE_DIR}/abc/alanmi-abc-53f39c11b58d) -endif() - -# Note: We don't check the system version since ABC does not provide a default -# install rule. -find_path(ABC_INCLUDE_DIR - NAMES base/abc/abc.h - PATHS ${ABC_HOME}/src - NO_DEFAULT_PATH) -find_library(ABC_LIBRARIES - NAMES abc - PATHS ${ABC_HOME} - NO_DEFAULT_PATH) -find_program(ABC_ARCH_FLAGS_PROG - NAMES arch_flags - PATHS ${ABC_HOME} - NO_DEFAULT_PATH) +# Note: contrib/get-abc copies header files to deps/install/include/abc. +# However, includes in ABC headers are not prefixed with "abc/" and therefore +# we have to look for headers in include/abc instead of include/. +find_path(ABC_INCLUDE_DIR NAMES base/abc/abc.h PATH_SUFFIXES abc) +find_library(ABC_LIBRARIES NAMES abc) +find_program(ABC_ARCH_FLAGS_PROG NAMES arch_flags) if(ABC_ARCH_FLAGS_PROG) execute_process(COMMAND ${ABC_ARCH_FLAGS_PROG} diff --git a/cmake/FindANTLR.cmake b/cmake/FindANTLR.cmake index 5f574247b..e12af826a 100644 --- a/cmake/FindANTLR.cmake +++ b/cmake/FindANTLR.cmake @@ -4,33 +4,9 @@ # ANTLR_INCLUDE_DIR - the ANTLR include directory # ANTLR_LIBRARIES - Libraries needed to use ANTLR - -# Check default location of ANTLR built with contrib/get-antlr-3.4. -# If the user provides a directory we will not search the default paths and -# fail if ANTLR was not found in the specified directory. -if(NOT ANTLR_HOME) - set(ANTLR_HOME ${PROJECT_SOURCE_DIR}/antlr-3.4) - set(CHECK_SYSTEM_VERSION TRUE) -endif() - -find_program(ANTLR_BINARY - NAMES antlr3 - PATHS ${ANTLR_HOME}/bin - NO_DEFAULT_PATH) -find_path(ANTLR_INCLUDE_DIR - NAMES antlr3.h - PATHS ${ANTLR_HOME}/include - NO_DEFAULT_PATH) -find_library(ANTLR_LIBRARIES - NAMES antlr3c antlr3c-static - PATHS ${ANTLR_HOME}/lib - NO_DEFAULT_PATH) - -if(CHECK_SYSTEM_VERSION) - find_program(ANTLR_BINARY NAMES antlr3) - find_path(ANTLR_INCLUDE_DIR NAMES antlr3.h) - find_library(ANTLR_LIBRARIES NAMES antlr3c) -endif() +find_program(ANTLR_BINARY NAMES antlr3) +find_path(ANTLR_INCLUDE_DIR NAMES antlr3.h) +find_library(ANTLR_LIBRARIES NAMES antlr3c antlr3c-static) # Check if antlr3FileStreamNew is available. If not we have to # define CVC4_ANTLR3_OLD_INPUT_STREAM (src/parser/CMakeLists.txt). diff --git a/cmake/FindCaDiCaL.cmake b/cmake/FindCaDiCaL.cmake index bd7de319a..5ca7ce7b0 100644 --- a/cmake/FindCaDiCaL.cmake +++ b/cmake/FindCaDiCaL.cmake @@ -3,28 +3,8 @@ # CaDiCaL_INCLUDE_DIR - the CaDiCaL include directory # CaDiCaL_LIBRARIES - Libraries needed to use CaDiCaL - -# Check default location of CaDiCaL built with contrib/get-cadical. -# If the user provides a directory we will not search the default paths and -# fail if CaDiCaL was not found in the specified directory. -if(NOT CaDiCaL_HOME) - set(CaDiCaL_HOME ${PROJECT_SOURCE_DIR}/cadical) - set(CHECK_SYSTEM_VERSION TRUE) -endif() - -find_path(CaDiCaL_INCLUDE_DIR - NAMES cadical.hpp - PATHS ${CaDiCaL_HOME}/src - NO_DEFAULT_PATH) -find_library(CaDiCaL_LIBRARIES - NAMES cadical - PATHS ${CaDiCaL_HOME}/build - NO_DEFAULT_PATH) - -if(CHECK_SYSTEM_VERSION) - find_path(CaDiCaL_INCLUDE_DIR NAMES cadical.hpp) - find_library(CaDiCaL_LIBRARIES NAMES cadical) -endif() +find_path(CaDiCaL_INCLUDE_DIR NAMES cadical.hpp) +find_library(CaDiCaL_LIBRARIES NAMES cadical) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(CaDiCaL diff --git a/cmake/FindCryptoMiniSat.cmake b/cmake/FindCryptoMiniSat.cmake index d96c54eb3..44b30ba7e 100644 --- a/cmake/FindCryptoMiniSat.cmake +++ b/cmake/FindCryptoMiniSat.cmake @@ -4,27 +4,8 @@ # CryptoMiniSat_LIBRARIES - Libraries needed to use CryptoMiniSat -# Check default location of CryptoMiniSat built with contrib/get-cryptominisat. -# 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/build) - set(CHECK_SYSTEM_VERSION TRUE) -endif() - -find_path(CryptoMiniSat_INCLUDE_DIR - NAMES cryptominisat5/cryptominisat.h - PATHS ${CryptoMiniSat_HOME}/include ${CryptoMiniSat_HOME}/cmsat5-src - NO_DEFAULT_PATH) -find_library(CryptoMiniSat_LIBRARIES - NAMES cryptominisat5 - PATHS ${CryptoMiniSat_HOME}/lib - NO_DEFAULT_PATH) - -if(CHECK_SYSTEM_VERSION) - find_path(CryptoMiniSat_INCLUDE_DIR NAMES cryptominisat5/cryptominisat.h) - find_library(CryptoMiniSat_LIBRARIES NAMES cryptominisat5) -endif() +find_path(CryptoMiniSat_INCLUDE_DIR NAMES cryptominisat5/cryptominisat.h) +find_library(CryptoMiniSat_LIBRARIES NAMES cryptominisat5) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(CryptoMiniSat diff --git a/cmake/FindDrat2Er.cmake b/cmake/FindDrat2Er.cmake index a7c2538a5..dc6f2a9b0 100644 --- a/cmake/FindDrat2Er.cmake +++ b/cmake/FindDrat2Er.cmake @@ -3,26 +3,9 @@ # Drat2Er_INCLUDE_DIR - the Drat2Er include directory # Drat2Er_LIBRARIES - Libraries needed to use Drat2Er - -# Check default location of Drat2Er built with contrib/get-drat2er. -# If the user provides a directory we will not search the default paths and -# fail if Drat2Er was not found in the specified directory. -if(NOT Drat2Er_HOME) - set(Drat2Er_HOME ${PROJECT_SOURCE_DIR}/drat2er/build/install) -endif() - -find_path(Drat2Er_INCLUDE_DIR - NAMES drat2er.h - PATHS ${Drat2Er_HOME}/include - NO_DEFAULT_PATH) -find_library(Drat2Er_LIBRARIES - NAMES libdrat2er.a - PATHS ${Drat2Er_HOME}/lib - NO_DEFAULT_PATH) -find_library(DratTrim_LIBRARIES - NAMES libdrat-trim.a - PATHS ${Drat2Er_HOME}/lib - NO_DEFAULT_PATH) +find_path(Drat2Er_INCLUDE_DIR NAMES drat2er.h) +find_library(Drat2Er_LIBRARIES NAMES libdrat2er.a) +find_library(DratTrim_LIBRARIES NAMES libdrat-trim.a) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Drat2Er diff --git a/cmake/FindGLPK.cmake b/cmake/FindGLPK.cmake index 1587ca821..390992639 100644 --- a/cmake/FindGLPK.cmake +++ b/cmake/FindGLPK.cmake @@ -4,27 +4,8 @@ # GLPK_LIBRARIES - Libraries needed to use GLPK -# Check default location of GLPK built with contrib/get-glpk-cut-log. -# If the user provides a directory we will not search the default paths and -# fail if GLPK was not found in the specified directory. -if(NOT GLPK_HOME) - set(GLPK_HOME ${PROJECT_SOURCE_DIR}/glpk-cut-log) - set(CHECK_SYSTEM_VERSION TRUE) -endif() - -find_path(GLPK_INCLUDE_DIR - NAMES glpk.h - PATHS ${GLPK_HOME}/include - NO_DEFAULT_PATH) -find_library(GLPK_LIBRARIES - NAMES glpk - PATHS ${GLPK_HOME}/lib - NO_DEFAULT_PATH) - -if(CHECK_SYSTEM_VERSION) - find_path(GLPK_INCLUDE_DIR NAMES glpk.h) - find_library(GLPK_LIBRARIES NAMES glpk) -endif() +find_path(GLPK_INCLUDE_DIR NAMES glpk.h) +find_library(GLPK_LIBRARIES NAMES glpk) # Check if we really have GLPK-cut-log. if(GLPK_INCLUDE_DIR) diff --git a/cmake/FindGMP.cmake b/cmake/FindGMP.cmake index 8125a583b..08cee9690 100644 --- a/cmake/FindGMP.cmake +++ b/cmake/FindGMP.cmake @@ -3,28 +3,8 @@ # GMP_INCLUDE_DIR - the GMP include directory # GMP_LIBRARIES - Libraries needed to use GMP - -# Check default location of GMP built with contrib/get-gmp. -# If the user provides a directory we will not search the default paths and -# fail if GMP was not found in the specified directory. -if(NOT GMP_HOME) - set(GMP_HOME ${PROJECT_SOURCE_DIR}/gmp-6.1.2) - set(CHECK_SYSTEM_VERSION TRUE) -endif() - -find_path(GMP_INCLUDE_DIR - NAMES gmp.h gmpxx.h - PATHS ${GMP_HOME}/include - NO_DEFAULT_PATH) -find_library(GMP_LIBRARIES - NAMES gmp - PATHS ${GMP_HOME}/lib - NO_DEFAULT_PATH) - -if(CHECK_SYSTEM_VERSION) - find_path(GMP_INCLUDE_DIR NAMES gmp.h gmpxx.h) - find_library(GMP_LIBRARIES NAMES gmp) -endif() +find_path(GMP_INCLUDE_DIR NAMES gmp.h gmpxx.h) +find_library(GMP_LIBRARIES NAMES gmp) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES) diff --git a/cmake/FindLFSC.cmake b/cmake/FindLFSC.cmake index 7a666839b..6135c7891 100644 --- a/cmake/FindLFSC.cmake +++ b/cmake/FindLFSC.cmake @@ -3,28 +3,8 @@ # LFSC_INCLUDE_DIR - the LFSC include directory # LFSC_LIBRARIES - Libraries needed to use LFSC - -# Check default location of LFSC built with contrib/get-lfsc. -# If the user provides a directory we will not search the default paths and -# fail if LFSC was not found in the specified directory. -if(NOT LFSC_HOME) - set(LFSC_HOME ${PROJECT_SOURCE_DIR}/lfsc-checker/install) - set(CHECK_SYSTEM_VERSION TRUE) -endif() - -find_path(LFSC_INCLUDE_DIR - NAMES lfscc.h - PATHS ${LFSC_HOME}/include - NO_DEFAULT_PATH) -find_library(LFSC_LIBRARIES - NAMES lfscc - PATHS ${LFSC_HOME}/lib - NO_DEFAULT_PATH) - -if(CHECK_SYSTEM_VERSION) - find_path(LFSC_INCLUDE_DIR NAMES lfscc.h) - find_library(LFSC_LIBRARIES NAMES lfscc) -endif() +find_path(LFSC_INCLUDE_DIR NAMES lfscc.h) +find_library(LFSC_LIBRARIES NAMES lfscc) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LFSC diff --git a/cmake/FindSymFPU.cmake b/cmake/FindSymFPU.cmake index f0f9ebf0f..dd9dbe113 100644 --- a/cmake/FindSymFPU.cmake +++ b/cmake/FindSymFPU.cmake @@ -2,23 +2,7 @@ # SymFPU_FOUND - system has SymFPU lib # SymFPU_INCLUDE_DIR - the SymFPU include directory - -# Check default location of SymFPU built with contrib/get-symfpu. -# If the user provides a directory we will not search the default paths and -# fail if SymFPU was not found in the specified directory. -if(NOT SymFPU_HOME) - set(SymFPU_HOME ${PROJECT_SOURCE_DIR}/symfpu-CVC4) - set(CHECK_SYSTEM_VERSION TRUE) -endif() - -find_path(SymFPU_INCLUDE_DIR - NAMES symfpu/core/unpackedFloat.h - PATHS ${SymFPU_HOME} - NO_DEFAULT_PATH) - -if(CHECK_SYSTEM_VERSION) - find_path(SymFPU_INCLUDE_DIR NAMES symfpu/core/unpackedFloat.h) -endif() +find_path(SymFPU_INCLUDE_DIR NAMES symfpu/core/unpackedFloat.h) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(SymFPU DEFAULT_MSG SymFPU_INCLUDE_DIR) |