From 640a07690826d4bbd87398949091b94b32e35c7a Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Thu, 15 Apr 2021 14:45:54 -0700 Subject: Build support library from base and context. (#6368) This PR creates a support library from the utilities in base and context, which will be required in the parser as soon as we move the symbol table/manager to the parser. Note: I decided to always build static libraries from base and context (and optionally enable -fPIC for shared builds) since I'm not sure if we want to have these libraries installed separately. Right now these are considered as cvc5 internal utilities that can be used in all cvc5 libraries, but not outside. --- src/CMakeLists.txt | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ee59d5d31..e060ae43f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,24 +19,6 @@ libcvc4_add_sources( api/cpp/cvc5.h api/cpp/cvc5_checks.h api/cpp/cvc5_kind.h - context/backtrackable.h - context/cddense_set.h - context/cdhashmap.h - context/cdhashmap_forward.h - context/cdhashset.h - context/cdhashset_forward.h - context/cdinsert_hashmap.h - context/cdinsert_hashmap_forward.h - context/cdlist.h - context/cdlist_forward.h - context/cdmaybe.h - context/cdo.h - context/cdqueue.h - context/cdtrail_queue.h - context/context.cpp - context/context.h - context/context_mm.cpp - context/context_mm.h decision/decision_attributes.h decision/decision_engine.cpp decision/decision_engine.h @@ -1100,6 +1082,7 @@ set(KINDS_FILES # Add subdirectories add_subdirectory(base) +add_subdirectory(context) add_subdirectory(expr) add_subdirectory(options) if (NOT BUILD_LIB_ONLY) @@ -1108,6 +1091,14 @@ endif() add_subdirectory(theory) add_subdirectory(util) +#-----------------------------------------------------------------------------# +# Build support library from base and context that can be used in the main +# library as well as the parser library. + +add_library(cvc4support INTERFACE) +target_link_libraries(cvc4support INTERFACE cvc4base) +target_link_libraries(cvc4support INTERFACE cvc4context) + #-----------------------------------------------------------------------------# # 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. @@ -1119,6 +1110,7 @@ target_include_directories(cvc4 $ $ ) +target_link_libraries(cvc4 PRIVATE cvc4support) include(GenerateExportHeader) generate_export_header(cvc4) @@ -1129,12 +1121,7 @@ install(TARGETS cvc4 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) set_target_properties(cvc4 PROPERTIES SOVERSION ${CVC5_SOVERSION}) -target_compile_definitions(cvc4 - PRIVATE - -D__BUILDING_CVC4LIB - -D__STDC_LIMIT_MACROS - -D__STDC_FORMAT_MACROS -) +target_compile_definitions(cvc4 PRIVATE -D__BUILDING_CVC4LIB) # Add libcvc4 dependencies for generated sources. add_dependencies(cvc4 gen-expr gen-gitinfo gen-options gen-tags gen-theory) -- cgit v1.2.3