Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BUILD_TOOLS option for building only libraries required by boolector. #19

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ include(GNUInstallDirs)

option(ASAN "Compile with ASAN support" OFF)
option(BUILD_BTOR2AIGER "Build btor2aiger binary" OFF)
option(BUILD_TOOLS "Build btorsim, catbtor, btorsplit binaries" OFF)
option(CHECK "Enable assertions for optimized builds" OFF)
option(BUILD_SHARED_LIBS "Build as shared library" ON)

Expand Down
40 changes: 21 additions & 19 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,28 @@ install(
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

add_executable(btorsim
btorsim/btorsimam.cpp
btorsim/btorsimstate.cpp
btorsim/btorsimvcd.cpp
btorsim/btorsimhelpers.cpp
btorsim/btorsim.cpp
btorsim/btorsimbv.c
btorsim/btorsimrng.c
)
target_include_directories(btorsim PRIVATE .)
target_link_libraries(btorsim btor2parser)
target_compile_options(btorsim PRIVATE -Wall -Wfatal-errors)
install(TARGETS btorsim DESTINATION ${CMAKE_INSTALL_BINDIR})
if (BUILD_TOOLS)
add_executable(btorsim
btorsim/btorsimam.cpp
btorsim/btorsimstate.cpp
btorsim/btorsimvcd.cpp
btorsim/btorsimhelpers.cpp
btorsim/btorsim.cpp
btorsim/btorsimbv.c
btorsim/btorsimrng.c
)
target_include_directories(btorsim PRIVATE .)
target_link_libraries(btorsim btor2parser)
target_compile_options(btorsim PRIVATE -Wall -Wfatal-errors)
install(TARGETS btorsim DESTINATION ${CMAKE_INSTALL_BINDIR})

add_executable(catbtor catbtor.c)
target_link_libraries(catbtor btor2parser)
install(TARGETS catbtor DESTINATION ${CMAKE_INSTALL_BINDIR})
add_executable(catbtor catbtor.c)
target_link_libraries(catbtor btor2parser)
install(TARGETS catbtor DESTINATION ${CMAKE_INSTALL_BINDIR})

add_executable(btorsplit btorsplit.cpp)
install(TARGETS btorsplit DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

if(BUILD_BTOR2AIGER)
add_executable(btor2aiger
Expand All @@ -38,6 +43,3 @@ if(BUILD_BTOR2AIGER)
target_link_libraries(btor2aiger btor2parser Boolector::boolector)
install(TARGETS btor2aiger DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

add_executable(btorsplit btorsplit.cpp)
install(TARGETS btorsplit DESTINATION ${CMAKE_INSTALL_BINDIR})
Loading