summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authormakaimann <makaim@stanford.edu>2020-08-12 12:03:45 -0700
committerGitHub <noreply@github.com>2020-08-12 14:03:45 -0500
commit27413a45e28001f6155d529a59d679556cdc011e (patch)
treeac64bba47c2bdba0c5863a1295c520d6971bac4b /src/CMakeLists.txt
parent9d1ce085de6df543d9d9a2fa9b8fa9001feb4b6b (diff)
Add option to only build library (#4801)
This PR would add an option to only build the CVC4 library and not the parser or executable. This can be used for projects that only intend to use CVC4 through the API. It seems to be working now, but it's not necessarily the cleanest solution. In particular, if you'd like the polarity to be different I'm happy to change that. Polarity meaning something like "${WITH_BINARY}" STREQUAL "YES" instead of NOT "${LIB_ONLY} STREQUAL "YES" which is admittedly a little strange.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2a5639e9e..67692f5c0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -867,7 +867,9 @@ set(KINDS_FILES
add_subdirectory(base)
add_subdirectory(expr)
add_subdirectory(options)
-add_subdirectory(parser)
+if (NOT BUILD_LIB_ONLY)
+ add_subdirectory(parser)
+endif()
add_subdirectory(theory)
add_subdirectory(util)
@@ -959,7 +961,9 @@ target_link_libraries(cvc4 ${RT_LIBRARIES})
# target_link_libraries(...) with object libraries for cmake versions <= 3.12.
# Thus, we can only visit main as soon as all dependencies for cvc4 are set up.
-add_subdirectory(main)
+if (NOT BUILD_LIB_ONLY)
+ add_subdirectory(main)
+endif()
#-----------------------------------------------------------------------------#
# Note:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback