cmake: Only build libcvc4 and libcvc4parser as libraries.
[cvc5.git] / src / theory / CMakeLists.txt
1 libcvc4_add_sources(GENERATED
2 rewriter_tables.h
3 theory_traits.h
4 type_enumerator.cpp
5 )
6
7 file(GLOB kinds_files ${PROJECT_SOURCE_DIR}/src/theory/*/kinds)
8
9 set(mktheorytraits_script ${CMAKE_CURRENT_LIST_DIR}/mktheorytraits)
10 set(mkrewriter_script ${CMAKE_CURRENT_LIST_DIR}/mkrewriter)
11
12 add_custom_command(
13 OUTPUT rewriter_tables.h
14 COMMAND
15 ${mkrewriter_script}
16 ${CMAKE_CURRENT_LIST_DIR}/rewriter_tables_template.h
17 ${kinds_files}
18 > ${CMAKE_CURRENT_BINARY_DIR}/rewriter_tables.h
19 DEPENDS mkrewriter rewriter_tables_template.h
20 )
21
22 add_custom_command(
23 OUTPUT theory_traits.h
24 COMMAND
25 ${mktheorytraits_script}
26 ${CMAKE_CURRENT_LIST_DIR}/theory_traits_template.h
27 ${kinds_files}
28 > ${CMAKE_CURRENT_BINARY_DIR}/theory_traits.h
29 DEPENDS mktheorytraits theory_traits_template.h
30 )
31
32 add_custom_command(
33 OUTPUT type_enumerator.cpp
34 COMMAND
35 ${mktheorytraits_script}
36 ${CMAKE_CURRENT_LIST_DIR}/type_enumerator_template.cpp
37 ${kinds_files}
38 > ${CMAKE_CURRENT_BINARY_DIR}/type_enumerator.cpp
39 DEPENDS mktheorytraits type_enumerator_template.cpp
40 )
41
42 add_custom_target(gen-theory
43 DEPENDS
44 type_enumerator.cpp
45 theory_traits.h
46 rewriter_tables.h
47 )