From: Mathias Preiner Date: Tue, 2 Oct 2018 18:52:06 +0000 (-0700) Subject: cmake: Add examples to build-tests, add warning for disabling static build. (#2562) X-Git-Tag: cvc5-1.0.0~4475 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1300320d84e89306ce988bd3cbe2b12f0fc6b8a5;p=cvc5.git cmake: Add examples to build-tests, add warning for disabling static build. (#2562) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e850f9928..435407fea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,6 +196,9 @@ endif() # Never build unit tests as static binaries, otherwise we'll end up with # ~300MB per unit test. if(ENABLE_UNIT_TESTING) + if(NOT ENABLE_SHARED) + message(WARNING "Disabling static build since unit testing is enabled.") + endif() set(ENABLE_SHARED ON) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f601e5247..b2f138572 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,6 +5,9 @@ # > system tests add_custom_target(build-tests) +# Since examples are also built and run for testing, we have to add examples +# to the build test dependencies. +add_dependencies(build-tests examples) # Note: Do not add custom targets for running tests (regress, systemtests, # units) as dependencies to other run targets. This will result in executing