blob: d3106b398ace116646f93aac89fbf6233fee1f8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
#####################
## CMakeLists.txt
## Top contributors (to current version):
## Mathias Preiner, Aina Niemetz, Andrew Reynolds
## This file is part of the CVC4 project.
## Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
## in the top-level source directory and their institutional affiliations.
## All rights reserved. See the file COPYING in the top-level source
## directory for licensing information.
##
# Check if the toml Python module is installed.
execute_process(
COMMAND
${PYTHON_EXECUTABLE} -c "import toml"
RESULT_VARIABLE
RET_TOML
ERROR_QUIET
)
if(RET_TOML)
message(FATAL_ERROR
"Could not find toml for Python "
"version ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}. "
"Make sure to install toml for this Python version "
"via \n`${PYTHON_EXECUTABLE} -m pip install toml'.\nNote: You need to "
"have pip installed for this Python version.")
endif()
libcvc4_add_sources(
base_handlers.h
decision_weight.h
didyoumean.cpp
didyoumean.h
language.cpp
language.h
open_ostream.cpp
open_ostream.h
option_exception.cpp
option_exception.h
options.h
options_handler.cpp
options_handler.h
options_listener.h
options_public_functions.cpp
printer_modes.cpp
printer_modes.h
set_language.cpp
set_language.h
)
set(options_toml_files
arith_options.toml
arrays_options.toml
base_options.toml
booleans_options.toml
builtin_options.toml
bv_options.toml
datatypes_options.toml
decision_options.toml
expr_options.toml
fp_options.toml
main_options.toml
parser_options.toml
printer_options.toml
proof_options.toml
prop_options.toml
quantifiers_options.toml
sep_options.toml
sets_options.toml
smt_options.toml
strings_options.toml
theory_options.toml
uf_options.toml
)
string(REPLACE "toml" "cpp;" options_gen_cpp_files ${options_toml_files})
string(REPLACE "toml" "h;" options_gen_h_files ${options_toml_files})
libcvc4_add_sources(GENERATED options.cpp ${options_gen_cpp_files})
list_prepend(options_toml_files "${CMAKE_CURRENT_LIST_DIR}/" abs_toml_files)
add_custom_command(
OUTPUT
options.cpp options_holder.h
${options_gen_cpp_files} ${options_gen_h_files}
COMMAND
${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_LIST_DIR}/mkoptions.py
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../../doc
${CMAKE_CURRENT_BINARY_DIR}
${abs_toml_files}
DEPENDS
mkoptions.py
${options_toml_files}
module_template.h
module_template.cpp
options_holder_template.h
options_template.cpp
${CMAKE_CURRENT_BINARY_DIR}/../../doc/cvc4.1_template
${CMAKE_CURRENT_BINARY_DIR}/../../doc/SmtEngine.3cvc_template
${CMAKE_CURRENT_BINARY_DIR}/../../doc/options.3cvc_template
)
add_custom_target(gen-options
DEPENDS
options.cpp
options_holder.h
${options_gen_cpp_files}
${options_gen_h_files}
)
|