Simplify interface to instantiate (#5926)
[cvc5.git] / src / theory / CMakeLists.txt
1 #####################
2 ## CMakeLists.txt
3 ## Top contributors (to current version):
4 ## Aina Niemetz, Mathias Preiner
5 ## This file is part of the CVC4 project.
6 ## Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
7 ## in the top-level source directory and their institutional affiliations.
8 ## All rights reserved. See the file COPYING in the top-level source
9 ## directory for licensing information.
10 ##
11 libcvc4_add_sources(GENERATED
12 rewriter_tables.h
13 theory_traits.h
14 type_enumerator.cpp
15 )
16
17 set(mktheorytraits_script ${CMAKE_CURRENT_LIST_DIR}/mktheorytraits)
18 set(mkrewriter_script ${CMAKE_CURRENT_LIST_DIR}/mkrewriter)
19
20 add_custom_command(
21 OUTPUT rewriter_tables.h
22 COMMAND
23 ${mkrewriter_script}
24 ${CMAKE_CURRENT_LIST_DIR}/rewriter_tables_template.h
25 ${KINDS_FILES}
26 > ${CMAKE_CURRENT_BINARY_DIR}/rewriter_tables.h
27 DEPENDS mkrewriter rewriter_tables_template.h ${KINDS_FILES}
28 )
29
30 add_custom_command(
31 OUTPUT theory_traits.h
32 COMMAND
33 ${mktheorytraits_script}
34 ${CMAKE_CURRENT_LIST_DIR}/theory_traits_template.h
35 ${KINDS_FILES}
36 > ${CMAKE_CURRENT_BINARY_DIR}/theory_traits.h
37 DEPENDS mktheorytraits theory_traits_template.h ${KINDS_FILES}
38 )
39
40 add_custom_command(
41 OUTPUT type_enumerator.cpp
42 COMMAND
43 ${mktheorytraits_script}
44 ${CMAKE_CURRENT_LIST_DIR}/type_enumerator_template.cpp
45 ${KINDS_FILES}
46 > ${CMAKE_CURRENT_BINARY_DIR}/type_enumerator.cpp
47 DEPENDS mktheorytraits type_enumerator_template.cpp ${KINDS_FILES}
48 )
49
50 add_custom_target(gen-theory
51 DEPENDS
52 type_enumerator.cpp
53 theory_traits.h
54 rewriter_tables.h
55 )