summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2021-04-15 14:45:54 -0700
committerGitHub <noreply@github.com>2021-04-15 21:45:54 +0000
commit640a07690826d4bbd87398949091b94b32e35c7a (patch)
tree6977ce7ed5f55b77f3ca79e055c411a3fa09b3fe /src/CMakeLists.txt
parent3564c3345d7fa53744661d815cbd463cc02567d7 (diff)
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.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt35
1 files changed, 11 insertions, 24 deletions
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)
@@ -1109,6 +1092,14 @@ 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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
+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)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback