+#-----------------------------------------------------------------------------#
# Set variables required for the documentation *.in files
+
string(TIMESTAMP MAN_DATE "%Y-%m-%d")
set(VERSION CVC4_RELEASE_STRING)
+#-----------------------------------------------------------------------------#
+# Generate files
+
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/SmtEngine.3cvc_template.in
${CMAKE_CURRENT_BINARY_DIR}/SmtEngine.3cvc_template)
${CMAKE_CURRENT_SOURCE_DIR}/options.3cvc_template.in
${CMAKE_CURRENT_BINARY_DIR}/options.3cvc_template)
+#-----------------------------------------------------------------------------#
+# Install man pages
+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cvc4.1 DESTINATION share/man/man1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cvc4.5 DESTINATION share/man/man5)
if(ENABLE_PORTFOLIO)
+#-----------------------------------------------------------------------------#
+# Collect libcvc4 source files
+
libcvc4_add_sources(
api/cvc4cpp.cpp
api/cvc4cpp.h
theory/valuation.h
)
+#-----------------------------------------------------------------------------#
# Add required include paths for this and all subdirectories.
+
include_directories(include)
include_directories(. ${CMAKE_CURRENT_BINARY_DIR})
+#-----------------------------------------------------------------------------#
+# Add subdirectories
+
add_subdirectory(base)
add_subdirectory(expr)
add_subdirectory(main)
add_subdirectory(theory)
add_subdirectory(util)
-# All sources for libcvc4 are now collected via libcvc4_add_sources. We can
-# now build libcvc4.
+#-----------------------------------------------------------------------------#
+# All sources for libcvc4 are now collected in LIBCVC4_SRCS and (if generated)
+# LIBCVC4_GEN_SRCS (via libcvc4_add_sources). We can now build libcvc4.
+
set_source_files_properties(${LIBCVC4_GEN_SRCS} PROPERTIES GENERATED TRUE)
add_library(cvc4 ${LIBCVC4_SRCS} ${LIBCVC4_GEN_SRCS})
+#-----------------------------------------------------------------------------#
+# libmain source files
+
set(libmain_src_files
command_executor.cpp
driver_unified.cpp
util.cpp
)
+#-----------------------------------------------------------------------------#
# Build object library since we will use the object files for cvc4-bin,
# pcvc4-bin, and main-test library.
+
add_library(main OBJECT ${libmain_src_files})
target_compile_definitions(main PRIVATE -D__BUILDING_CVC4DRIVER)
if(BUILD_SHARED_LIBS)
add_library(main-test $<TARGET_OBJECTS:main>)
target_link_libraries(main-test cvc4 cvc4parser)
+#-----------------------------------------------------------------------------#
+# cvc4 binary configuration
+
add_executable(cvc4-bin main.cpp $<TARGET_OBJECTS:main>)
target_compile_definitions(cvc4-bin PRIVATE -D__BUILDING_CVC4DRIVER)
set_target_properties(cvc4-bin
endif()
endif()
+#-----------------------------------------------------------------------------#
+# Generate language tokens header files.
+
foreach(lang Cvc Smt1 Smt2 Tptp)
string(TOLOWER ${lang} lang_lc)
add_custom_command(
)
endforeach()
+# Create target used as a dependency for libmain.
add_custom_target(gen-tokens
DEPENDS
cvc_tokens.h
smt2_tokens.h
tptp_tokens.h
)
+
# Java runtime is required for ANTLR
find_package(Java COMPONENTS Runtime REQUIRED)
-set(cvc4parser_src_files
+#-----------------------------------------------------------------------------#
+# libcvc4parser source files
+
+set(libcvc4parser_src_files
antlr_input.cpp
antlr_input.h
antlr_input_imports.cpp
tptp/tptp_input.h
)
+#-----------------------------------------------------------------------------#
# Generate parsers for all supported languages
+
foreach(lang Cvc Smt1 Smt2 Tptp)
string(TOLOWER ${lang} lang_dir)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir})
set_source_files_properties(${gen_src_files} PROPERTIES GENERATED TRUE)
# Add generated source files to the parser source files
- list(APPEND cvc4parser_src_files ${gen_src_files})
+ list(APPEND libcvc4parser_src_files ${gen_src_files})
endforeach()
-add_library(cvc4parser ${cvc4parser_src_files})
+#-----------------------------------------------------------------------------#
+# libcvc4parser configuration
+
+add_library(cvc4parser ${libcvc4parser_src_files})
set_target_properties(cvc4parser PROPERTIES SOVERSION ${CVC4_SOVERSION})
target_compile_definitions(cvc4parser PRIVATE -D__BUILDING_CVC4PARSERLIB)
target_link_libraries(cvc4parser cvc4 ${ANTLR_LIBRARIES})
+#-----------------------------------------------------------------------------#
+# Regression level 0 tests
+
set(regress_0_tests
regress0/arith/arith.01.cvc
regress0/arith/arith.02.cvc
regress0/sygus/hd-05-d1-prog-nogrammar.sy
)
+#-----------------------------------------------------------------------------#
+# Regression level 1 tests
+
set(regress_1_tests
regress1/arith/arith-int-004.cvc
regress1/arith/arith-int-011.cvc
regress1/wrong-qfabvfp-smtcomp2018.smt2
)
+#-----------------------------------------------------------------------------#
+# Regression level 2 tests
+
set(regress_2_tests
regress2/DTP_k2_n35_c175_s15.smt2
regress2/FIREFLY_3_e2_2236_e7_3681.ec.minimized.smt2
regress2/xs-09-16-3-4-1-5.smt
)
+#-----------------------------------------------------------------------------#
+# Regression level 3 tests
+
set(regress_3_tests
regress3/bmc-ibm-1.smt
regress3/bmc-ibm-2.smt
regress3/qwh.35.405.shuffled-as.sat03-1651.smt
)
+#-----------------------------------------------------------------------------#
+# Regression level 4 tests
+
set(regress_4_tests
regress4/C880mul.miter.shuffled-as.sat03-348.smt
regress4/NEQ016_size5.smt
regress4/instance_1151.smt
)
-# These tests will not be run.
+#-----------------------------------------------------------------------------#
+# Disabled tests, will not be run.
+
set(regression_disabled_tests
regress0/arith/bug549.cvc
regress0/arith/incorrect1.smt
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
cvc4_add_unit_test_black(map_util_black)
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
cvc4_add_unit_test_black(cdlist_black)
cvc4_add_unit_test_black(cdmap_black)
cvc4_add_unit_test_white(cdmap_white)
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
cvc4_add_unit_test_black(attribute_black)
cvc4_add_unit_test_white(attribute_white)
cvc4_add_unit_test_black(expr_manager_public)
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
cvc4_add_unit_test_black(interactive_shell_black)
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
cvc4_add_unit_test_black(parser_black)
cvc4_add_unit_test_black(parser_builder_black)
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
cvc4_add_unit_test_white(pass_bv_gauss_white)
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
cvc4_add_unit_test_white(cnf_stream_white)
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
cvc4_add_unit_test_black(array_store_all_black)
cvc4_add_unit_test_white(assert_white)
cvc4_add_unit_test_black(binary_heap_black)