diff options
author | makaimann <makaim@stanford.edu> | 2020-08-12 12:03:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 14:03:45 -0500 |
commit | 27413a45e28001f6155d529a59d679556cdc011e (patch) | |
tree | ac64bba47c2bdba0c5863a1295c520d6971bac4b /configure.sh | |
parent | 9d1ce085de6df543d9d9a2fa9b8fa9001feb4b6b (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 'configure.sh')
-rwxr-xr-x | configure.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.sh b/configure.sh index 3bce5a548..48d1b82b2 100755 --- a/configure.sh +++ b/configure.sh @@ -80,6 +80,10 @@ Optional Path to Optional Packages: --poly-dir=PATH path to top level of LibPoly source tree --symfpu-dir=PATH path to top level of SymFPU source tree +Build limitations: + --lib-only only build the library, but not the executable or + the parser (default: off) + EOF exit 0 } @@ -161,6 +165,8 @@ lfsc_dir=default poly_dir=default symfpu_dir=default +lib_only=default + #--------------------------------------------------------------------------# while [ $# -gt 0 ] @@ -334,6 +340,8 @@ do --symfpu-dir) die "missing argument to $1 (try -h)" ;; --symfpu-dir=*) symfpu_dir=${1##*=} ;; + --lib-only) lib_only=ON ;; + -*) die "invalid option '$1' (try -h)";; *) case $1 in @@ -455,6 +463,8 @@ cmake_opts="" && cmake_opts="$cmake_opts -DPOLY_DIR=$poly_dir" [ "$symfpu_dir" != default ] \ && cmake_opts="$cmake_opts -DSYMFPU_DIR=$symfpu_dir" +[ "$lib_only" != default ] \ + && cmake_opts="$cmake_opts -DBUILD_LIB_ONLY=$lib_only" [ "$install_prefix" != default ] \ && cmake_opts="$cmake_opts -DCMAKE_INSTALL_PREFIX=$install_prefix" [ -n "$program_prefix" ] \ |