From: Gereon Kremer Date: Wed, 11 May 2022 18:13:31 +0000 (-0700) Subject: Remove --build from GMP configure line (#8752) X-Git-Tag: cvc5-1.0.1~146 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a191a3fae2abfc68be734ca5790024fea93e9f1;p=cvc5.git Remove --build from GMP configure line (#8752) This is an attempt to fix the pypi build. --- diff --git a/cmake/FindGMP.cmake b/cmake/FindGMP.cmake index 38771692a..481bd973a 100644 --- a/cmake/FindGMP.cmake +++ b/cmake/FindGMP.cmake @@ -65,6 +65,11 @@ if(NOT GMP_FOUND_SYSTEM) set(GMP_LIBRARIES "${DEPS_BASE}/lib/libgmp.a") endif() + set(CONFIGURE_OPTS "") + if(CMAKE_CROSSCOMPILING) + set(CONFIGURE_OPTS --host=${TOOLCHAIN_PREFIX} --build=${CMAKE_HOST_SYSTEM_PROCESSOR}) + endif() + # `CC_FOR_BUILD`, `--host`, and `--build` are passed to `configure` to ensure # that cross-compilation works (as suggested in the GMP documentation). # Without the `--build` flag, `configure` may fail for cross-compilation @@ -81,8 +86,7 @@ if(NOT GMP_FOUND_SYSTEM) --prefix= --with-pic --enable-cxx - --host=${TOOLCHAIN_PREFIX} - --build=${CMAKE_HOST_SYSTEM_PROCESSOR} + ${CONFIGURE_OPTS} BUILD_BYPRODUCTS ${GMP_LIBRARIES} ) endif()