Skip to content

Commit

Permalink
adding Z3 to build
Browse files Browse the repository at this point in the history
  • Loading branch information
castrod committed Feb 3, 2025
1 parent b615203 commit 2dabdf3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ project("${PROJECT_NAME}"
DESCRIPTION "IDNI's tau language"
)

include(FetchContent)

option(TAU_MEASURE "Measure tau performance" OFF)
option(PARSER_MEASURE "Measure parser performance" OFF)
option(TAU_CACHE "Cache costly computations" OFF)
Expand Down Expand Up @@ -168,6 +170,16 @@ endif()
option(BOOST_LOG_TRIVIAL "Build logging in parser" ON)
option(PARSER_BUILD_STATIC_LIBRARY "Build only static library" ON)

#
# Adding Z3 (see https://github.com/Z3Prover/z3/blob/master/README-CMake.md)
#
FetchContent_Declare(z3
GIT_REPOSITORY https://github.com/Z3Prover/z3
GIT_TAG z3-4.13.4
)
FetchContent_MakeAvailable(z3)
include_directories( ${z3_SOURCE_DIR}/src/api )

# TODO (LOW) make it run automatically on grammar modifications
#
# Check https://stackoverflow.com/questions/26193068/how-to-only-build-auto-generated-code-when-the-generator-or-input-changes-in-cma
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ set(CLI_SOURCES
add_library(${TAU_OBJECT_LIB_NAME} OBJECT)
target_sources(${TAU_OBJECT_LIB_NAME} PRIVATE ${TAU_SOURCES})
target_setup(${TAU_OBJECT_LIB_NAME})
target_link_libraries(${TAU_OBJECT_LIB_NAME} ${IDNI_PARSER_OBJECT_LIB} Boost::log)
target_link_libraries(${TAU_OBJECT_LIB_NAME} ${IDNI_PARSER_OBJECT_LIB} Boost::log libz3)
target_compile_options(${TAU_OBJECT_LIB_NAME} PRIVATE -fPIC)
target_include_directories(${TAU_OBJECT_LIB_NAME} PUBLIC
$<BUILD_INTERFACE:${TAU}/src>
Expand Down

0 comments on commit 2dabdf3

Please sign in to comment.