diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2021-04-15 14:45:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 21:45:54 +0000 |
commit | 640a07690826d4bbd87398949091b94b32e35c7a (patch) | |
tree | 6977ce7ed5f55b77f3ca79e055c411a3fa09b3fe /src/base | |
parent | 3564c3345d7fa53744661d815cbd463cc02567d7 (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/base')
-rw-r--r-- | src/base/CMakeLists.txt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 4b3e41ff9..684660f78 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -23,7 +23,7 @@ add_custom_target(gen-gitinfo #-----------------------------------------------------------------------------# -libcvc4_add_sources( +set(LIBBASE_SOURCES check.cpp check.h configuration.cpp @@ -36,9 +36,12 @@ libcvc4_add_sources( modal_exception.h output.cpp output.h + ${CMAKE_CURRENT_BINARY_DIR}/git_versioninfo.cpp +) +set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/git_versioninfo.cpp + PROPERTIES GENERATED TRUE ) - -libcvc4_add_sources(GENERATED git_versioninfo.cpp) #-----------------------------------------------------------------------------# # Generate code for debug/trace tags @@ -75,3 +78,9 @@ set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/Trace_tags.h PROPERTIES GENERATED TRUE ) + +add_library(cvc4base STATIC ${LIBBASE_SOURCES}) +if(ENABLE_SHARED) + set_target_properties(cvc4base PROPERTIES POSITION_INDEPENDENT_CODE ON) +endif() +target_compile_definitions(cvc4base PRIVATE -D__BUILDING_CVC4LIB) |