From: Gereon Kremer Date: Tue, 20 Apr 2021 16:22:47 +0000 (+0200) Subject: Properly link Poly against GMP (#6398) X-Git-Tag: cvc5-1.0.0~1884 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=29d19c62ff1a65665f852134c24c17cca45251cd;p=cvc5.git Properly link Poly against GMP (#6398) This PR fixes a linker issue with libpoly and static builds where Poly and GMP would be linked against in the wrong order. --- diff --git a/cmake/FindPoly.cmake b/cmake/FindPoly.cmake index 1259459a2..4521605b9 100644 --- a/cmake/FindPoly.cmake +++ b/cmake/FindPoly.cmake @@ -93,7 +93,6 @@ if(NOT Poly_FOUND_SYSTEM) DEPENDEES install COMMAND ${CMAKE_COMMAND} -E remove_directory /test/ ) - add_dependencies(Poly-EP GMP) set(Poly_INCLUDE_DIR "${DEPS_BASE}/include/") set(Poly_LIBRARIES "${DEPS_BASE}/lib/libpicpoly.a") @@ -107,6 +106,7 @@ set_target_properties(Poly PROPERTIES IMPORTED_LOCATION "${Poly_LIBRARIES}") set_target_properties( Poly PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Poly_INCLUDE_DIR}" ) +target_link_libraries(Poly INTERFACE GMP) add_library(Polyxx STATIC IMPORTED GLOBAL) set_target_properties(Polyxx PROPERTIES IMPORTED_LOCATION "${PolyXX_LIBRARIES}")