Skip to content

Commit 11c0df4

Browse files
daniel-larrazyoni206
authored andcommitted
cmake: Upgrade libpoly to v0.2.0 (cvc5#11861)
The latest release of libpoly includes fixes for building the library with recent versions of Clang (SRI-CSL/libpoly#85) and CMake (SRI-CSL/libpoly#92). This PR also removes some patches that are not longer required.
1 parent cf52841 commit 11c0df4

File tree

4 files changed

+7
-34
lines changed

4 files changed

+7
-34
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ if(USE_KISSAT)
561561
endif()
562562

563563
if(USE_POLY)
564-
find_package(Poly 0.1.13 REQUIRED)
564+
find_package(Poly 0.2.0 REQUIRED)
565565
add_definitions(-DCVC5_USE_POLY)
566566
set(CVC5_USE_POLY_IMP 1)
567567
else()

INSTALL.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ may improve performance. It can be downloaded and built automatically. Configure
219219
cvc5 with ``configure.sh --kissat`` to build with this dependency.
220220

221221

222-
LibPoly >= v0.1.13 (Optional polynomial library)
222+
LibPoly >= v0.2.0 (Optional polynomial library)
223223
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224224

225225
`LibPoly <https://github.com/SRI-CSL/libpoly>`_ is required for CAD-based

cmake/FindPoly.cmake

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,7 @@ if(NOT Poly_FOUND_SYSTEM)
5050

5151
include(ExternalProject)
5252

53-
set(Poly_VERSION "0.1.13")
54-
55-
check_if_cross_compiling(CCWIN "Windows" "")
56-
if(CCWIN)
57-
set(POLY_PATCH_CMD COMMAND
58-
${CMAKE_SOURCE_DIR}/cmake/deps-utils/Poly-windows-patch.sh <SOURCE_DIR>
59-
)
60-
else()
61-
unset(POLY_PATCH_CMD)
62-
endif()
53+
set(Poly_VERSION "0.2.0")
6354

6455
# On Windows, CMake's default install action places DLLs into the runtime
6556
# path (/bin) after doing the build with 'ExternalProject_Add'
@@ -138,8 +129,8 @@ if(NOT Poly_FOUND_SYSTEM)
138129
# We only want to install the headers and the position-independent version
139130
# of the static libraries, so remove the installation targets for the other
140131
# versions of LibPoly
141-
set(POLY_PATCH_CMD ${POLY_PATCH_CMD}
142-
COMMAND
132+
set(POLY_PATCH_CMD
133+
PATCH_COMMAND
143134
sed -ri.orig
144135
"/TARGETS (poly|polyxx|static_poly|static_polyxx) /d"
145136
<SOURCE_DIR>/src/CMakeLists.txt
@@ -163,11 +154,7 @@ if(NOT Poly_FOUND_SYSTEM)
163154
Poly-EP
164155
${COMMON_EP_CONFIG}
165156
URL https://github.com/SRI-CSL/libpoly/archive/refs/tags/v${Poly_VERSION}.tar.gz
166-
URL_HASH SHA256=ca7092eeeced3dd8bd86cdd3410207802ef1752d7052d92eee3e9e6bb496763c
167-
PATCH_COMMAND
168-
sed -i.orig
169-
"s,add_subdirectory(test/polyxx),add_subdirectory(test/polyxx EXCLUDE_FROM_ALL),g"
170-
<SOURCE_DIR>/CMakeLists.txt
157+
URL_HASH SHA256=146adc0d3f6fe8038adb6b8b69dd16114a4be12f520d5c1fb333f3746d233abe
171158
${POLY_PATCH_CMD}
172159
CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release
173160
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
@@ -178,7 +165,7 @@ if(NOT Poly_FOUND_SYSTEM)
178165
-DGMP_INCLUDE_DIR=${GMP_INCLUDE_DIR}
179166
-DGMP_LIBRARY=${GMP_LIBRARIES}
180167
-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=TRUE
181-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
168+
-DBUILD_TESTING=OFF
182169
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} ${POLY_TARGETS}
183170
${POLY_INSTALL_CMD}
184171
BUILD_BYPRODUCTS ${POLY_BYPRODUCTS}

cmake/deps-utils/Poly-windows-patch.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)