Skip to content

Commit bc6cb74

Browse files
committed
We can easily build FLINT 3.2.1
1 parent 195847f commit bc6cb74

File tree

4 files changed

+12
-34
lines changed

4 files changed

+12
-34
lines changed

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,7 @@ set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/he
335335
find_package(GMP REQUIRED)
336336
find_package(MPFR REQUIRED)
337337

338-
option(POLYS "Allow polynomials" ON)
339-
if (POLYS)
340-
find_package(FLINT REQUIRED)
341-
add_definitions( -DPOLYS )
342-
endif()
338+
find_package(FLINT REQUIRED)
343339
MESSAGE(STATUS "MPFR include dir: ${MPFR_INCLUDE_DIR}")
344340
MESSAGE(STATUS "MPFR lib dir: ${MPFR_LIBRARIES}")
345341

scripts/build_emscripten.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
rm -rf lib* Test* tests* include tests CM* cmake* arjun Makefile rjun-src
5-
emcmake cmake -DCMAKE_INSTALL_PREFIX=$EMINSTALL -DENABLE_TESTING=OFF -DPOLYS=OFF ..
5+
emcmake cmake -DCMAKE_INSTALL_PREFIX=$EMINSTALL -DENABLE_TESTING=OFF ..
66
emmake make -j26
77
emmake make install
88
cp ganak.wasm ../html

src/CMakeLists.txt

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ include_directories(${MPFR_INCLUDE_DIR})
2929
include_directories( ${GMP_INCLUDE_DIR} )
3030
include_directories( ${BREAKID_INCLUDE_DIRS} )
3131
include_directories( ${APPROXMC_INCLUDE_DIRS} )
32-
if (POLYS)
33-
include_directories( ${FLINT_INCLUDE_DIRS} )
34-
endif()
32+
include_directories( ${FLINT_INCLUDE_DIRS} )
3533

3634
if (NOT WIN32)
3735
#add_cxx_flag_if_supported("-Wno-bitfield-constant-conversion")
@@ -78,35 +76,26 @@ SET(SOURCES
7876
buddy-2.4/src/tree.c
7977
buddy-2.4/src/cppext.cxx
8078
ganak.cpp
81-
${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp
79+
${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp
8280
)
8381

84-
set (GLIBS
82+
ADD_LIBRARY(ganak ${SOURCES} ${LIB})
83+
target_link_libraries (ganak
8584
LINK_PUBLIC ${CRYPTOMINISAT5_LIBRARIES}
8685
LINK_PUBLIC ${ARJUN_LIBRARIES}
8786
LINK_PUBLIC ${APPROXMC_LIBRARIES}
8887
LINK_PUBLIC ${BREAKID_LIBRARIES}
89-
)
90-
91-
if (POLYS)
92-
set (GLIBS ${GLIBS}
93-
LINK_PUBLIC ${FLINT_LIBRARIES})
94-
endif()
95-
96-
set (GLIBS ${GLIBS}
88+
LINK_PUBLIC ${FLINT_LIBRARIES}
9789
LINK_PUBLIC ${MPFR_LIBRARIES}
9890
LINK_PUBLIC ${GMP_LIBRARIES}
9991
)
10092

101-
ADD_LIBRARY(ganak ${SOURCES} ${LIB})
102-
target_link_libraries (ganak ${GLIBS})
103-
10493
set_target_properties(ganak PROPERTIES
105-
PUBLIC_HEADER "${ganak_public_headers}"
106-
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
107-
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
108-
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
109-
INSTALL_RPATH_USE_LINK_PATH TRUE
94+
PUBLIC_HEADER "${ganak_public_headers}"
95+
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
96+
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
97+
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
98+
INSTALL_RPATH_USE_LINK_PATH TRUE
11099
)
111100

112101
add_executable (ganak-bin main.cpp)

src/main.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ THE SOFTWARE.
4242
#include <breakid/breakid.hpp>
4343
#include <arjun/arjun.h>
4444
#include "src/argparse.hpp"
45-
#ifdef POLYS
4645
#include "mpoly.hpp"
47-
#endif
4846
#include "mparity.hpp"
4947
#include "mcomplex.hpp"
5048
#include "mcomplex-mpfr.hpp"
@@ -530,16 +528,11 @@ int main(int argc, char *argv[])
530528
fg = std::make_unique<FGenMPFComplex>();
531529
break;
532530
case 3:
533-
#ifdef POLYS
534531
if (poly_nvars == -1) {
535532
cout << "c o [arjun] ERROR: Must provide number of polynomial vars for mode 3 via --npolyvars" << endl;
536533
exit(-1);
537534
}
538535
fg = std::make_unique<FGenPoly>(poly_nvars);
539-
#else
540-
cout << "c o [arjun] ERROR: Polynomials not supported in this build" << endl;
541-
exit(-1);
542-
#endif
543536
break;
544537
case 4:
545538
fg = std::make_unique<FGenParity>();

0 commit comments

Comments
 (0)