1 ###############################################################################
2 # Top contributors (to current version):
3 # Aina Niemetz, Mathias Preiner, Gereon Kremer
5 # This file is part of the cvc5 project.
7 # Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8 # in the top-level source directory and their institutional affiliations.
9 # All rights reserved. See the file COPYING in the top-level source
10 # directory for licensing information.
11 # #############################################################################
13 # The build system configuration.
16 cmake_minimum_required(VERSION 3.9)
18 #-----------------------------------------------------------------------------#
19 # Project configuration
23 include(GNUInstallDirs)
25 set(CVC5_MAJOR 1) # Major component of the version of cvc5.
26 set(CVC5_MINOR 0) # Minor component of the version of cvc5.
27 set(CVC5_RELEASE 0) # Release component of the version of cvc5.
29 # Extraversion component of the version of cvc5.
30 set(CVC5_EXTRAVERSION "-prerelease")
32 # Shared library versioning. Increment SOVERSION for every new cvc5 release.
35 # Full release string for cvc5.
37 set(CVC5_RELEASE_STRING
38 "${CVC5_MAJOR}.${CVC5_MINOR}.${CVC5_RELEASE}${CVC5_EXTRAVERSION}")
40 set(CVC5_RELEASE_STRING "${CVC5_MAJOR}.${CVC5_MINOR}${CVC5_EXTRAVERSION}")
43 set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
44 set(CMAKE_C_STANDARD 99)
45 set(CMAKE_CXX_STANDARD 17)
46 set(CMAKE_CXX_EXTENSIONS OFF)
47 set(CMAKE_CXX_STANDARD_REQUIRED ON)
48 set(CMAKE_CXX_VISIBILITY_PRESET hidden)
49 set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
51 # Generate compile_commands.json, which can be used for various code completion
53 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
55 #-----------------------------------------------------------------------------#
58 # Required for FindGLPK since it sets CMAKE_REQUIRED_LIBRARIES
60 cmake_policy(SET CMP0075 NEW)
63 #-----------------------------------------------------------------------------#
64 # Tell CMake where to find our dependencies
67 list(APPEND CMAKE_PREFIX_PATH "${ABC_DIR}")
70 list(APPEND CMAKE_PREFIX_PATH "${GLPK_DIR}")
73 # By default the contrib/get-* scripts install dependencies to deps/install.
74 list(APPEND CMAKE_PREFIX_PATH "${PROJECT_SOURCE_DIR}/deps/install")
76 #-----------------------------------------------------------------------------#
80 #-----------------------------------------------------------------------------#
84 option(ENABLE_GPL "Enable GPL dependencies")
86 # General build options
88 # >> 3-valued: IGNORE ON OFF
89 # > allows to detect if set by user (default: IGNORE)
90 # > only necessary for options set for build types
91 cvc5_option(ENABLE_ASAN "Enable ASAN build")
92 cvc5_option(ENABLE_UBSAN "Enable UBSan build")
93 cvc5_option(ENABLE_TSAN "Enable TSan build")
94 cvc5_option(ENABLE_ASSERTIONS "Enable assertions")
95 cvc5_option(ENABLE_COMP_INC_TRACK
96 "Enable optimizations for incremental SMT-COMP tracks")
97 cvc5_option(ENABLE_DEBUG_SYMBOLS "Enable debug symbols")
98 cvc5_option(ENABLE_DUMPING "Enable dumping")
99 cvc5_option(ENABLE_MUZZLE "Suppress ALL non-result output")
100 cvc5_option(ENABLE_STATISTICS "Enable statistics")
101 cvc5_option(ENABLE_TRACING "Enable tracing")
102 cvc5_option(ENABLE_UNIT_TESTING "Enable unit testing")
103 cvc5_option(ENABLE_VALGRIND "Enable valgrind instrumentation")
104 cvc5_option(ENABLE_SHARED "Build as shared library")
105 cvc5_option(ENABLE_STATIC_BINARY
106 "Build static binaries with statically linked system libraries")
107 cvc5_option(ENABLE_AUTO_DOWNLOAD "Enable automatic download of dependencies")
108 # >> 2-valued: ON OFF
109 # > for options where we don't need to detect if set by user (default: OFF)
110 option(ENABLE_BEST "Enable dependencies known to give best performance")
111 option(ENABLE_COVERAGE "Enable support for gcov coverage testing")
112 option(ENABLE_DEBUG_CONTEXT_MM "Enable the debug context memory manager")
113 option(ENABLE_PROFILING "Enable support for gprof profiling")
115 # Optional dependencies
117 # >> 3-valued: IGNORE ON OFF
118 # > allows to detect if set by user (default: IGNORE)
119 # > only necessary for options set for ENABLE_BEST
120 cvc5_option(USE_ABC "Use ABC for AIG bit-blasting")
121 cvc5_option(USE_CLN "Use CLN instead of GMP")
122 cvc5_option(USE_CRYPTOMINISAT "Use CryptoMiniSat SAT solver")
123 cvc5_option(USE_GLPK "Use GLPK simplex solver")
124 cvc5_option(USE_KISSAT "Use Kissat SAT solver")
125 cvc5_option(USE_EDITLINE "Use Editline for better interactive support")
126 # >> 2-valued: ON OFF
127 # > for options where we don't need to detect if set by user (default: OFF)
128 option(USE_POLY "Use LibPoly for polynomial arithmetic")
129 option(USE_COCOA "Use CoCoALib for further polynomial operations")
130 option(USE_PYTHON2 "Force Python 2 (deprecated)")
132 # Custom install directories for dependencies
133 # If no directory is provided by the user, we first check if the dependency was
134 # installed via the corresponding contrib/get-* script and if not found, we
135 # check the intalled system version. If the user provides a directory we
136 # immediately fail if the dependency was not found at the specified location.
137 set(ABC_DIR "" CACHE STRING "Set ABC install directory")
138 set(GLPK_DIR "" CACHE STRING "Set GLPK install directory")
140 # Prepend binaries with prefix on make install
141 set(PROGRAM_PREFIX "" CACHE STRING "Program prefix on make install")
143 # Supported language bindings based on new C++ API
144 option(BUILD_BINDINGS_PYTHON "Build Python bindings based on new C++ API ")
145 option(BUILD_BINDINGS_JAVA "Build Java bindings based on new C++ API ")
148 option(BUILD_LIB_ONLY "Only build the library")
151 cvc5_option(BUILD_DOCS "Build Api documentation")
153 #-----------------------------------------------------------------------------#
154 # Internal cmake variables
156 set(OPTIMIZATION_LEVEL 3)
159 #-----------------------------------------------------------------------------#
160 # Determine number of threads available, used to configure (default) parallel
161 # execution of custom test targets (can be overriden with ARGS=-jN).
163 include(ProcessorCount)
164 ProcessorCount(CTEST_NTHREADS)
165 if(CTEST_NTHREADS EQUAL 0)
166 set(CTEST_NTHREADS 1)
169 #-----------------------------------------------------------------------------#
172 # Note: Module CodeCoverage requires the name of the debug build to conform
173 # to cmake standards (first letter uppercase).
174 set(BUILD_TYPES Production Debug Testing Competition)
176 if(ENABLE_ASAN OR ENABLE_UBSAN OR ENABLE_TSAN)
177 set(CMAKE_BUILD_TYPE Debug)
180 # Set the default build type to Production
181 if(NOT CMAKE_BUILD_TYPE)
183 Production CACHE STRING "Options are: ${BUILD_TYPES}" FORCE)
184 # Provide drop down menu options in cmake-gui
185 set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${BUILD_TYPES})
188 # Check if specified build type is valid.
189 list(FIND BUILD_TYPES ${CMAKE_BUILD_TYPE} FOUND_BUILD_TYPE)
190 if(${FOUND_BUILD_TYPE} EQUAL -1)
192 "'${CMAKE_BUILD_TYPE}' is not a valid build type. "
193 "Available builds are: ${BUILD_TYPES}")
196 message(STATUS "Building ${CMAKE_BUILD_TYPE} build")
197 include(Config${CMAKE_BUILD_TYPE})
199 #-----------------------------------------------------------------------------#
202 add_check_c_cxx_flag("-O${OPTIMIZATION_LEVEL}")
203 add_check_c_cxx_flag("-Wall")
204 add_check_c_cxx_flag("-Wno-unused-private-field")
205 add_check_c_flag("-fexceptions")
206 add_check_cxx_flag("-Wsuggest-override")
207 add_check_cxx_flag("-Wnon-virtual-dtor")
208 add_check_c_cxx_flag("-Wimplicit-fallthrough")
209 add_check_c_cxx_flag("-Wshadow")
211 # Temporarily disable -Wclass-memaccess to suppress 'no trivial copy-assignment'
212 # cdlist.h warnings. Remove when fixed.
213 add_check_cxx_flag("-Wno-class-memaccess")
216 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,100000000")
219 #-----------------------------------------------------------------------------#
220 # Use ld.gold if available
222 execute_process(COMMAND ${CMAKE_C_COMPILER}
224 -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
225 if ("${LD_VERSION}" MATCHES "GNU gold")
226 string(APPEND CMAKE_EXE_LINKER_FLAGS " -fuse-ld=gold")
227 string(APPEND CMAKE_SHARED_LINKER_FLAGS " -fuse-ld=gold")
228 string(APPEND CMAKE_MODULE_LINKER_FLAGS " -fuse-ld=gold")
229 message(STATUS "Using GNU gold linker.")
232 #-----------------------------------------------------------------------------#
233 # Option defaults (three-valued options (cvc5_option(...)))
235 # These options are only set if their value is IGNORE. Otherwise, the user
236 # already set the option, which we don't want to overwrite.
238 if(ENABLE_STATIC_BINARY)
239 cvc5_set_option(ENABLE_SHARED OFF)
241 cvc5_set_option(ENABLE_SHARED ON)
244 #-----------------------------------------------------------------------------#
246 # Only enable unit testing if assertions are enabled. Otherwise, unit tests
247 # that expect AssertionException to be thrown will fail.
248 if(NOT ENABLE_ASSERTIONS)
249 message(STATUS "Disabling unit tests since assertions are disabled.")
250 set(ENABLE_UNIT_TESTING OFF)
253 #-----------------------------------------------------------------------------#
254 # Shared/static libraries
256 # This needs to be set before any find_package(...) command since we want to
257 # search for static libraries with suffix .a.
260 set(BUILD_SHARED_LIBS ON)
261 if(ENABLE_STATIC_BINARY)
262 set(ENABLE_STATIC_BINARY OFF)
263 message(STATUS "Disabling static binary since shared build is enabled.")
266 # Set visibility to default if unit tests are enabled
267 if(ENABLE_UNIT_TESTING)
268 set(CMAKE_CXX_VISIBILITY_PRESET default)
269 set(CMAKE_VISIBILITY_INLINES_HIDDEN 0)
272 # Embed the installation prefix as an RPATH in the executable such that the
273 # linker can find our libraries (such as libcvc5parser) when executing the
274 # cvc5 binary. This is for example useful when installing cvc5 with a custom
275 # prefix on macOS (e.g. when using homebrew in a non-standard directory). If
276 # we do not set this option, then the linker will not be able to find the
277 # required libraries when trying to run cvc5.
279 # Also embed the installation prefix of the installed contrib libraries as an
280 # RPATH. This allows to install a dynamically linked binary that depends on
281 # dynamically linked libraries. This is dangerous, as the installed binary
282 # breaks if the contrib library is removed or changes in other ways, we thus
283 # print a big warning and only allow if installing to a custom installation
286 # More information on RPATH in CMake:
287 # https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
288 set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR};${PROJECT_SOURCE_DIR}/deps/install/lib")
290 # When building statically, we *only* want static archives/libraries
292 set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
294 set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
296 set(BUILD_SHARED_LIBS OFF)
297 cvc5_set_option(ENABLE_STATIC_BINARY ON)
299 # Never build unit tests as static binaries, otherwise we'll end up with
300 # ~300MB per unit test.
301 if(ENABLE_UNIT_TESTING)
302 message(STATUS "Disabling unit tests since static build is enabled.")
303 set(ENABLE_UNIT_TESTING OFF)
306 if (BUILD_BINDINGS_PYTHON)
307 message(FATAL_ERROR "Building Python bindings is not possible "
308 "when building statically")
312 #-----------------------------------------------------------------------------#
313 # Enable the ctest testing framework
315 # This needs to be enabled here rather than in subdirectory test in order to
316 # allow calling ctest from the root build directory.
319 #-----------------------------------------------------------------------------#
320 # Check options, find packages and configure build.
323 find_package(PythonInterp 2.7 REQUIRED)
325 find_package(PythonInterp 3 REQUIRED)
328 find_package(GMP 6.1 REQUIRED)
331 # -fsanitize=address requires CMAKE_REQUIRED_FLAGS to be explicitely set,
332 # otherwise the -fsanitize=address check will fail while linking.
333 set(CMAKE_REQUIRED_FLAGS -fsanitize=address)
334 add_required_c_cxx_flag("-fsanitize=address")
335 unset(CMAKE_REQUIRED_FLAGS)
336 add_required_c_cxx_flag("-fno-omit-frame-pointer")
337 add_check_c_cxx_flag("-fsanitize-recover=address")
341 add_required_c_cxx_flag("-fsanitize=undefined")
342 add_definitions(-DCVC5_USE_UBSAN)
346 # -fsanitize=thread requires CMAKE_REQUIRED_FLAGS to be explicitely set,
347 # otherwise the -fsanitize=thread check will fail while linking.
348 set(CMAKE_REQUIRED_FLAGS -fsanitize=thread)
349 add_required_c_cxx_flag("-fsanitize=thread")
350 unset(CMAKE_REQUIRED_FLAGS)
353 if(ENABLE_ASSERTIONS)
354 add_definitions(-DCVC5_ASSERTIONS)
356 add_definitions(-DNDEBUG)
360 include(CodeCoverage)
361 APPEND_COVERAGE_COMPILER_FLAGS()
362 add_definitions(-DCVC5_COVERAGE)
363 # Note: The ctest command returns a non-zero exit code if tests fail or run
364 # into a timeout. As a consequence, the coverage report is not generated. To
365 # prevent this we always return with exit code 0 after the ctest command has
367 setup_target_for_coverage_gcovr_html(
370 ctest -j${CTEST_NTHREADS} -LE "example"
371 --output-on-failure $$ARGS || exit 0
375 # Adds targets `coverage` and `coverage-reset` for manually generating
376 # coverage reports for specific executions.
378 # Target coverage-reset resets all the coverage counters to zero, while
379 # target coverage will generate a coverage report for all executions since
380 # the last coverage-reset.
381 setup_target_for_coverage_lcov_no_executable(
383 DEPENDENCIES cvc5-bin)
386 if(ENABLE_DEBUG_CONTEXT_MM)
387 add_definitions(-DCVC5_DEBUG_CONTEXT_MEMORY_MANAGER)
390 if(ENABLE_DEBUG_SYMBOLS)
391 add_check_c_cxx_flag("-ggdb3")
394 if(ENABLE_COMP_INC_TRACK)
395 add_definitions(-DCVC5_SMTCOMP_APPLICATION_TRACK)
399 add_definitions(-DCVC5_MUZZLE)
403 add_definitions(-DCVC5_DUMPING)
407 add_definitions(-DCVC5_PROFILING)
408 add_check_c_cxx_flag("-pg")
412 add_definitions(-DCVC5_TRACING)
415 if(ENABLE_STATISTICS)
416 add_definitions(-DCVC5_STATISTICS_ON)
420 find_package(Valgrind REQUIRED)
421 add_definitions(-DCVC5_VALGRIND)
425 find_package(ABC REQUIRED)
426 add_definitions(-DCVC5_USE_ABC ${ABC_ARCH_FLAGS})
429 find_package(CaDiCaL REQUIRED)
432 set(GPL_LIBS "${GPL_LIBS} cln")
433 find_package(CLN 1.2.2 REQUIRED)
434 set(CVC5_USE_CLN_IMP 1)
435 set(CVC5_USE_GMP_IMP 0)
437 set(CVC5_USE_CLN_IMP 0)
438 set(CVC5_USE_GMP_IMP 1)
441 if(USE_CRYPTOMINISAT)
442 # CryptoMiniSat requires pthreads support
443 set(THREADS_PREFER_PTHREAD_FLAG ON)
444 find_package(Threads REQUIRED)
445 if(THREADS_HAVE_PTHREAD_ARG)
446 add_c_cxx_flag(-pthread)
448 find_package(CryptoMiniSat 5.8 REQUIRED)
449 add_definitions(-DCVC5_USE_CRYPTOMINISAT)
453 set(GPL_LIBS "${GPL_LIBS} glpk")
454 find_package(GLPK REQUIRED)
455 add_definitions(-DCVC5_USE_GLPK)
459 find_package(Kissat REQUIRED)
460 add_definitions(-DCVC5_USE_KISSAT)
464 find_package(Poly REQUIRED)
465 add_definitions(-DCVC5_USE_POLY)
466 set(CVC5_USE_POLY_IMP 1)
468 set(CVC5_USE_POLY_IMP 0)
472 find_package(CoCoA REQUIRED 0.99711)
473 add_definitions(-DCVC5_USE_COCOA)
477 find_package(Editline REQUIRED)
478 set(HAVE_LIBEDITLINE 1)
479 if(Editline_COMPENTRY_FUNC_RETURNS_CHARPTR)
480 set(EDITLINE_COMPENTRY_FUNC_RETURNS_CHARP 1)
484 find_package(SymFPU REQUIRED)
489 "Bad configuration detected: BSD-licensed code only, but also requested "
490 "GPLed libraries: ${GPL_LIBS}")
495 #-----------------------------------------------------------------------------#
496 # Provide targets to inspect iwyu suggestions
500 #-----------------------------------------------------------------------------#
502 include(ConfigureCvc5)
503 if(NOT ENABLE_SHARED)
504 set(CVC5_STATIC_BUILD ON)
507 #-----------------------------------------------------------------------------#
510 add_subdirectory(src)
512 if(BUILD_BINDINGS_PYTHON)
513 set(BUILD_BINDINGS_PYTHON_VERSION ${PYTHON_VERSION_MAJOR})
514 add_subdirectory(src/api/python)
517 if(BUILD_BINDINGS_JAVA)
518 add_subdirectory(src/api/java)
519 message(WARNING "Java API is currently under development.")
523 add_subdirectory(docs)
526 add_subdirectory(test)
528 #-----------------------------------------------------------------------------#
529 # Package configuration
531 # Export cvc5 targets to support find_package(cvc5) in other cmake projects.
533 include(CMakePackageConfigHelpers)
535 # If we install a dynamically linked binary that also uses dynamically used
536 # libraries from deps/install/lib, we need to be cautious. Changing these
537 # shared libraries from deps/install/lib most probably breaks the binary.
538 # We only allow such an installation for custom installation prefixes
539 # (in the assumption that only reasonably experienced users use this and
540 # also that custom installation prefixes are not used for longer periods of
541 # time anyway). Also, we print a big warning with further instructions.
542 if(NOT ENABLE_STATIC_BINARY)
543 # Get the libraries that cvc5 links against
544 get_target_property(libs cvc5 INTERFACE_LINK_LIBRARIES)
545 set(LIBS_SHARED_FROM_DEPS "")
547 # Filter out those that are linked dynamically and come from deps/install
548 if(lib MATCHES ".*/deps/install/lib/.*\.so")
549 list(APPEND LIBS_SHARED_FROM_DEPS ${lib})
552 list(LENGTH LIBS_SHARED_FROM_DEPS list_len)
553 # Check if we actually use such "dangerous" libraries
554 if(list_len GREATER 0)
555 # Print a generic warning
556 install(CODE "message(WARNING \"You are installing a dynamically linked \
557 binary of cvc5 which may be a problem if you are using any dynamically \
558 linked third-party library that you obtained through one of the \
559 contrib/get-xxx scripts. The binary uses the rpath mechanism to find these \
560 locally, hence executing such a contrib script removing the \
561 \\\"deps/install\\\" folder most probably breaks the installed binary! \
562 Consider installing the dynamically linked dependencies on your system \
563 manually or link cvc5 statically.\")")
564 # Print the libraries in question
565 foreach(lib ${LIBS_SHARED_FROM_DEPS})
566 install(CODE "message(WARNING \"The following library is used by the cvc5 binary: ${lib}\")")
568 # Check if we use a custom installation prefix
569 if(CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
570 install(CODE "message(FATAL_ERROR \"To avoid installing a \
571 soon-to-be-broken binary, system-wide installation is disabled if the \
572 binary depends on locally-built shared libraries.\")")
574 install(CODE "message(WARNING \"You have selected a custom install \
575 directory ${CMAKE_INSTALL_PREFIX}, so we expect you understood the \
576 previous warning and know what you are doing.\")")
581 install(EXPORT cvc5-targets
582 FILE cvc5Targets.cmake
584 DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cvc5)
586 configure_package_config_file(
587 ${CMAKE_SOURCE_DIR}/cmake/cvc5Config.cmake.in
588 ${CMAKE_BINARY_DIR}/cmake/cvc5Config.cmake
589 INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cvc5
590 PATH_VARS CMAKE_INSTALL_LIBDIR
593 write_basic_package_version_file(
594 ${CMAKE_CURRENT_BINARY_DIR}/cvc5ConfigVersion.cmake
595 VERSION ${CVC5_RELEASE_STRING}
596 COMPATIBILITY ExactVersion
600 ${CMAKE_BINARY_DIR}/cmake/cvc5Config.cmake
601 ${CMAKE_BINARY_DIR}/cvc5ConfigVersion.cmake
602 DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cvc5
606 #-----------------------------------------------------------------------------#
607 # Print build configuration
612 set(Green "${Esc}[32m")
613 set(Blue "${Esc}[1;34m")
614 set(ResetColor "${Esc}[m")
617 # Convert build type to lower case.
618 string(TOLOWER ${CMAKE_BUILD_TYPE} CVC5_BUILD_PROFILE_STRING)
620 # Get all definitions added via add_definitions.
621 get_directory_property(CVC5_DEFINITIONS COMPILE_DEFINITIONS)
622 string(REPLACE ";" " " CVC5_DEFINITIONS "${CVC5_DEFINITIONS}")
625 print_info("cvc5 ${CVC5_RELEASE_STRING}")
627 if(ENABLE_COMP_INC_TRACK)
628 print_config("Build profile " "${CVC5_BUILD_PROFILE_STRING} (incremental)")
630 print_config("Build profile " "${CVC5_BUILD_PROFILE_STRING}")
633 print_config("GPL " ${ENABLE_GPL})
634 print_config("Best configuration " ${ENABLE_BEST})
636 print_config("Assertions " ${ENABLE_ASSERTIONS})
637 print_config("Debug symbols " ${ENABLE_DEBUG_SYMBOLS})
638 print_config("Debug context mem mgr " ${ENABLE_DEBUG_CONTEXT_MM})
640 print_config("Dumping " ${ENABLE_DUMPING})
641 print_config("Muzzle " ${ENABLE_MUZZLE})
642 print_config("Statistics " ${ENABLE_STATISTICS})
643 print_config("Tracing " ${ENABLE_TRACING})
645 print_config("ASan " ${ENABLE_ASAN})
646 print_config("UBSan " ${ENABLE_UBSAN})
647 print_config("TSan " ${ENABLE_TSAN})
648 print_config("Coverage (gcov) " ${ENABLE_COVERAGE})
649 print_config("Profiling (gprof) " ${ENABLE_PROFILING})
650 print_config("Unit tests " ${ENABLE_UNIT_TESTING})
651 print_config("Valgrind " ${ENABLE_VALGRIND})
653 print_config("Shared libs " ${ENABLE_SHARED})
654 print_config("Static binary " ${ENABLE_STATIC_BINARY})
655 print_config("Python bindings " ${BUILD_BINDINGS_PYTHON})
656 print_config("Java bindings " ${BUILD_BINDINGS_JAVA})
657 print_config("Python2 " ${USE_PYTHON2})
659 print_config("ABC " ${USE_ABC})
660 print_config("CryptoMiniSat " ${USE_CRYPTOMINISAT})
661 print_config("GLPK " ${USE_GLPK})
662 print_config("Kissat " ${USE_KISSAT})
663 print_config("LibPoly " ${USE_POLY})
664 print_config("CoCoALib " ${USE_COCOA})
666 print_config("Build libcvc5 only " ${BUILD_LIB_ONLY})
669 print_config("MP library " "cln")
671 print_config("MP library " "gmp")
673 print_config("Editline " ${USE_EDITLINE})
675 print_config("Api docs " ${BUILD_DOCS})
678 print_config("ABC dir " ${ABC_DIR})
681 print_config("GLPK dir " ${GLPK_DIR})
684 print_config("CPPLAGS (-D...)" "${CVC5_DEFINITIONS}")
685 print_config("CXXFLAGS " "${CMAKE_CXX_FLAGS}")
686 print_config("CFLAGS " "${CMAKE_C_FLAGS}")
687 print_config("Linker flags " "${CMAKE_EXE_LINKER_FLAGS}")
689 print_config("Install prefix " "${CMAKE_INSTALL_PREFIX}")
694 "${Blue}cvc5 license: "
695 "${Yellow}GPLv3 (due to optional libraries; see below)${ResetColor}"
698 "Please note that cvc5 will be built against the following GPLed libraries:"
702 "As these libraries are covered under the GPLv3, so is this build of cvc5."
704 "cvc5 is also available to you under the terms of the (modified) BSD license."
706 "If you prefer to license cvc5 under those terms, please configure cvc5 to"
708 "disable all optional GPLed library dependencies (-DENABLE_BSD_ONLY=ON)."
712 "${Blue}cvc5 license:${ResetColor} modified BSD"
715 "Note that this configuration is NOT built against any GPL'ed libraries, so"
717 "it is covered by the (modified) BSD license. This is, however, not the best"
719 "performing configuration of cvc5. To build against GPL'ed libraries which"
721 "improve cvc5's performance, re-configure with '-DENABLE_GPL -DENABLE_BEST'."
725 if("${CMAKE_GENERATOR}" STREQUAL "Ninja")
726 set(BUILD_COMMAND_NAME "ninja")
728 set(BUILD_COMMAND_NAME "make")
732 message("Now just type '${BUILD_COMMAND_NAME}', "
733 "followed by '${BUILD_COMMAND_NAME} check' "
734 "or '${BUILD_COMMAND_NAME} install'.")