summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindANTLR3.cmake6
-rw-r--r--cmake/FindCLN.cmake6
-rw-r--r--cmake/FindCaDiCaL.cmake7
-rw-r--r--cmake/FindCryptoMiniSat.cmake12
-rw-r--r--cmake/FindGMP.cmake6
-rw-r--r--cmake/FindGTest.cmake6
-rw-r--r--cmake/FindKissat.cmake6
-rw-r--r--cmake/FindPoly.cmake6
-rw-r--r--cmake/FindSymFPU.cmake6
-rw-r--r--cmake/deps-helper.cmake14
10 files changed, 60 insertions, 15 deletions
diff --git a/cmake/FindANTLR3.cmake b/cmake/FindANTLR3.cmake
index 5429be99a..3ed3c5376 100644
--- a/cmake/FindANTLR3.cmake
+++ b/cmake/FindANTLR3.cmake
@@ -34,7 +34,11 @@ if(ANTLR3_JAR AND ANTLR3_INCLUDE_DIR AND ANTLR3_RUNTIME)
endif()
if(NOT ANTLR3_FOUND_SYSTEM)
- check_auto_download("ANTLR3" "")
+ check_ep_downloaded("ANTLR3-EP-jar")
+ if(NOT ANTLR3-EP-jar_DOWNLOADED)
+ check_auto_download("ANTLR3" "")
+ endif()
+
include(ExternalProject)
set(ANTLR3_VERSION "3.4")
diff --git a/cmake/FindCLN.cmake b/cmake/FindCLN.cmake
index 5a2295c4b..b5b37ec59 100644
--- a/cmake/FindCLN.cmake
+++ b/cmake/FindCLN.cmake
@@ -34,7 +34,11 @@ if(CLN_INCLUDE_DIR AND CLN_LIBRARIES)
endif()
if(NOT CLN_FOUND_SYSTEM)
- check_auto_download("CLN" "--no-cln")
+ check_ep_downloaded("CLN-EP")
+ if(NOT CLN-EP_DOWNLOADED)
+ check_auto_download("CLN" "--no-cln")
+ endif()
+
include(ExternalProject)
fail_if_cross_compiling("Windows" "" "CLN" "autoconf fails")
diff --git a/cmake/FindCaDiCaL.cmake b/cmake/FindCaDiCaL.cmake
index 82737a0ac..7c70a066c 100644
--- a/cmake/FindCaDiCaL.cmake
+++ b/cmake/FindCaDiCaL.cmake
@@ -39,7 +39,11 @@ if(CaDiCaL_INCLUDE_DIR AND CaDiCaL_LIBRARIES)
endif()
if(NOT CaDiCaL_FOUND_SYSTEM)
- check_auto_download("CaDiCaL" "--no-cadical")
+ check_ep_downloaded("CaDiCaL-EP")
+ if(NOT CaDiCaL-EP_DOWNLOADED)
+ check_auto_download("CaDiCaL" "--no-cadical")
+ endif()
+
include(CheckSymbolExists)
include(ExternalProject)
@@ -102,5 +106,4 @@ if(CaDiCaL_FOUND_SYSTEM)
message(STATUS "Found CaDiCaL ${CaDiCaL_VERSION}: ${CaDiCaL_LIBRARIES}")
else()
message(STATUS "Building CaDiCaL ${CaDiCaL_VERSION}: ${CaDiCaL_LIBRARIES}")
- add_dependencies(CaDiCaL CaDiCaL-EP)
endif()
diff --git a/cmake/FindCryptoMiniSat.cmake b/cmake/FindCryptoMiniSat.cmake
index 08cb6f6a1..9599f645f 100644
--- a/cmake/FindCryptoMiniSat.cmake
+++ b/cmake/FindCryptoMiniSat.cmake
@@ -22,6 +22,7 @@ find_package(cryptominisat5 ${CryptoMiniSat_FIND_VERSION} QUIET)
set(CryptoMiniSat_FOUND_SYSTEM FALSE)
if(cryptominisat5_FOUND)
+ set(CryptoMiniSat_VERSION ${cryptominisat5_VERSION})
set(CryptoMiniSat_FOUND_SYSTEM TRUE)
add_library(CryptoMiniSat INTERFACE IMPORTED GLOBAL)
target_link_libraries(CryptoMiniSat INTERFACE cryptominisat5)
@@ -31,15 +32,18 @@ if(cryptominisat5_FOUND)
CryptoMiniSat PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CRYPTOMINISAT5_INCLUDE_DIRS}"
)
-
endif()
if(NOT CryptoMiniSat_FOUND_SYSTEM)
- check_auto_download("CryptoMiniSat" "--no-cryptominisat")
- include(ExternalProject)
-
set(CryptoMiniSat_VERSION "5.8.0")
+ check_ep_downloaded("CryptoMiniSat-EP")
+ if(NOT CryptoMiniSat-EP_DOWNLOADED)
+ check_auto_download("CryptoMiniSat" "--no-cryptominisat")
+ endif()
+
+ include(ExternalProject)
+
ExternalProject_Add(
CryptoMiniSat-EP
${COMMON_EP_CONFIG}
diff --git a/cmake/FindGMP.cmake b/cmake/FindGMP.cmake
index f5447f95d..c554197b9 100644
--- a/cmake/FindGMP.cmake
+++ b/cmake/FindGMP.cmake
@@ -43,7 +43,11 @@ if(GMP_INCLUDE_DIR AND GMP_LIBRARIES)
endif()
if(NOT GMP_FOUND_SYSTEM)
- check_auto_download("GMP" "")
+ check_ep_downloaded("GMP-EP")
+ if(NOT GMP-EP_DOWNLOADED)
+ check_auto_download("GMP" "")
+ endif()
+
include(ExternalProject)
set(GMP_VERSION "6.2.1")
diff --git a/cmake/FindGTest.cmake b/cmake/FindGTest.cmake
index bc12e44ba..d36829784 100644
--- a/cmake/FindGTest.cmake
+++ b/cmake/FindGTest.cmake
@@ -25,7 +25,11 @@ if(GTest_INCLUDE_DIR AND GTest_LIBRARIES AND GTest_MAIN_LIBRARIES)
endif()
if(NOT GTest_FOUND_SYSTEM)
- check_auto_download("GTest" "")
+ check_ep_downloaded("GTest-EP")
+ if(NOT GTest-EP_DOWNLOADED)
+ check_auto_download("GTest" "")
+ endif()
+
include(ExternalProject)
set(GTest_VERSION "1.10.0")
diff --git a/cmake/FindKissat.cmake b/cmake/FindKissat.cmake
index 62aa5eeec..08b214961 100644
--- a/cmake/FindKissat.cmake
+++ b/cmake/FindKissat.cmake
@@ -39,7 +39,11 @@ if(Kissat_INCLUDE_DIR AND Kissat_LIBRARIES)
endif()
if(NOT Kissat_FOUND_SYSTEM)
- check_auto_download("Kissat" "--no-kissat")
+ check_ep_downloaded("Kissat-EP")
+ if(NOT Kissat-EP_DOWNLOADED)
+ check_auto_download("Kissat" "--no-kissat")
+ endif()
+
include(ExternalProject)
fail_if_include_missing("sys/resource.h" "Kissat")
diff --git a/cmake/FindPoly.cmake b/cmake/FindPoly.cmake
index 2030ca806..0a5780585 100644
--- a/cmake/FindPoly.cmake
+++ b/cmake/FindPoly.cmake
@@ -38,7 +38,11 @@ if(Poly_INCLUDE_DIR
endif()
if(NOT Poly_FOUND_SYSTEM)
- check_auto_download("Poly" "--no-poly")
+ check_ep_downloaded("Poly-EP")
+ if(NOT Poly-EP_DOWNLOADED)
+ check_auto_download("Poly" "--no-poly")
+ endif()
+
include(ExternalProject)
set(Poly_VERSION "0.1.9")
diff --git a/cmake/FindSymFPU.cmake b/cmake/FindSymFPU.cmake
index be5b1eacb..5a2ac5111 100644
--- a/cmake/FindSymFPU.cmake
+++ b/cmake/FindSymFPU.cmake
@@ -24,7 +24,11 @@ if(SymFPU_INCLUDE_DIR)
endif()
if(NOT SymFPU_FOUND_SYSTEM)
- check_auto_download("SymFPU" "--no-symfpu")
+ check_ep_downloaded("SymFPU-EP")
+ if(NOT SymFPU-EP_DOWNLOADED)
+ check_auto_download("SymFPU" "--no-symfpu")
+ endif()
+
include(ExternalProject)
include(deps-helper)
diff --git a/cmake/deps-helper.cmake b/cmake/deps-helper.cmake
index f044c2706..f37ccb1f2 100644
--- a/cmake/deps-helper.cmake
+++ b/cmake/deps-helper.cmake
@@ -47,11 +47,11 @@ macro(check_auto_download name disable_option)
set(depname "${name}")
endif()
if("${disable_option}" STREQUAL "")
- message(FATAL_ERROR "Could not find the required dependency
+ message(FATAL_ERROR "Could not find the required dependency \
${depname} in the system. Please install it yourself or use --auto-download to \
let us download and build it for you.")
else()
- message(FATAL_ERROR "Could not find the optional dependency
+ message(FATAL_ERROR "Could not find the optional dependency \
${depname} in the system. You can disable this dependency with \
${disable_option}, install it yourself or use --auto-download to let us \
download and build it for you.")
@@ -59,6 +59,16 @@ download and build it for you.")
endif()
endmacro(check_auto_download)
+# Check if the given external project was already set up in a previous
+# configure call.
+macro(check_ep_downloaded name)
+ if(EXISTS "${DEPS_PREFIX}/src/${name}")
+ set(${name}_DOWNLOADED TRUE)
+ else()
+ set(${name}_DOWNLOADED FALSE)
+ endif()
+endmacro()
+
macro(check_system_version name)
# find_package sets this variable when called with a version
# https://cmake.org/cmake/help/latest/command/find_package.html#version-selection
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback