Add `deep-restart` option (#8644)
[cvc5.git] / test / CMakeLists.txt
1 ###############################################################################
2 # Top contributors (to current version):
3 # Mathias Preiner, Aina Niemetz, Yoni Zohar
4 #
5 # This file is part of the cvc5 project.
6 #
7 # Copyright (c) 2009-2022 by the authors listed in the file AUTHORS
8 # in the top-level source directory and their institutional affiliations.
9 # All rights reserved. See the file COPYING in the top-level source
10 # directory for licensing information.
11 # #############################################################################
12 #
13 # The build system configuration.
14 ##
15
16 # Add target 'check', builds and runs
17 # > unit tests
18 # > regression tests of levels 0 and 1
19 # > api tests
20
21 add_custom_target(build-tests)
22
23 # Note: Do not add custom targets for running tests (regress, apitests,
24 # units) as dependencies to other run targets. This will result in executing
25 # tests multiple times. For example, if check would depend on regress it would
26 # first run the command of the regress target (i.e., run all regression tests)
27 # and afterwards run the command specified for the check target.
28 # Dependencies of check are added in the corresponding subdirectories.
29 add_custom_target(check
30 COMMAND
31 ctest --output-on-failure -LE "regress[3-4]" -j${CTEST_NTHREADS} $$ARGS
32 DEPENDS
33 build-tests)
34
35 #-----------------------------------------------------------------------------#
36 # Add subdirectories
37
38 add_subdirectory(regress)
39 add_subdirectory(api EXCLUDE_FROM_ALL)
40 add_subdirectory(binary EXCLUDE_FROM_ALL)
41 if(ENABLE_UNIT_TESTING)
42 add_subdirectory(unit EXCLUDE_FROM_ALL)
43 endif()