3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00

[CMake] Fix dependencies for generating install_tactic.cpp.

Previously CMake was not aware of which headers files the generation
of `install_tactic.cpp` depended on. Consequently this could result
in broken incremental builds if

* Existing headers that declared tactics/probes changed.
* New tactics/probes were added to new header files.

Now the `z3_add_component()` CMake function has been modifed to take an
optional `TACTIC_HEADERS` argument which allows the headers that declare
tactics/probes to be explicitly listed. The necessary component
declarations have been modified to declare their tactic/probe header
files.

With this information CMake will now regenerate `install_tactic.cpp`
correctly.

This required the `mk_install_tactic_cpp_internal()` function to be
changed to take a list of header files rather than a list of component
source directories. The two consumers (CMake and Python/Makefile build
systems) of this function have been modified to work with this change.

This partially fixes #1030.
This commit is contained in:
Dan Liew 2017-06-21 18:36:20 +01:00
parent a3ee785923
commit 229fd3dc3e
22 changed files with 171 additions and 32 deletions

View file

@ -18,4 +18,8 @@ z3_add_component(tactic
COMPONENT_DEPENDENCIES
ast
model
TACTIC_HEADERS
probe.h
sine_filter.h
tactic.h
)

View file

@ -4,4 +4,6 @@ z3_add_component(aig_tactic
aig_tactic.cpp
COMPONENT_DEPENDENCIES
tactic
TACTIC_HEADERS
aig_tactic.h
)

View file

@ -28,4 +28,23 @@ z3_add_component(arith_tactics
COMPONENT_DEPENDENCIES
core_tactics
sat
TACTIC_HEADERS
add_bounds_tactic.h
card2bv_tactic.h
degree_shift_tactic.h
diff_neq_tactic.h
elim01_tactic.h
eq2bv_tactic.h
factor_tactic.h
fix_dl_var_tactic.h
fm_tactic.h
lia2pb_tactic.h
lia2card_tactic.h
nla2bv_tactic.h
normalize_bounds_tactic.h
pb2bv_tactic.h
probe_arith.h
propagate_ineqs_tactic.h
purify_arith_tactic.h
recover_01_tactic.h
)

View file

@ -15,4 +15,14 @@ z3_add_component(bv_tactics
bit_blaster
core_tactics
tactic
TACTIC_HEADERS
bit_blaster_tactic.h
bv1_blaster_tactic.h
bv_bound_chk_tactic.h
bv_bounds_tactic.h
bv_size_reduction_tactic.h
bvarray2uf_tactic.h
dt2bv_tactic.h
elim_small_bv_tactic.h
max_bv_sharing_tactic.h
)

View file

@ -3,7 +3,7 @@ z3_add_component(core_tactics
blast_term_ite_tactic.cpp
cofactor_elim_term_ite.cpp
cofactor_term_ite_tactic.cpp
collect_statistics_tactic.cpp
collect_statistics_tactic.cpp
ctx_simplify_tactic.cpp
der_tactic.cpp
distribute_forall_tactic.cpp
@ -23,5 +23,24 @@ z3_add_component(core_tactics
COMPONENT_DEPENDENCIES
normal_forms
tactic
TACTIC_HEADERS
blast_term_ite_tactic.h
cofactor_term_ite_tactic.h
collect_statistics_tactic.h
ctx_simplify_tactic.h
der_tactic.h
distribute_forall_tactic.h
elim_term_ite_tactic.h
elim_uncnstr_tactic.h
nnf_tactic.h
occf_tactic.h
pb_preprocess_tactic.h
propagate_values_tactic.h
reduce_args_tactic.h
simplify_tactic.h
solve_eqs_tactic.h
split_clause_tactic.h
symmetry_reduce_tactic.h
tseitin_cnf_tactic.h
)

View file

@ -11,4 +11,7 @@ z3_add_component(fpa_tactics
sat_tactic
smtlogic_tactics
smt_tactic
TACTIC_HEADERS
fpa2bv_tactic.h
qffp_tactic.h
)

View file

@ -4,4 +4,6 @@ z3_add_component(nlsat_smt_tactic
COMPONENT_DEPENDENCIES
nlsat_tactic
smt_tactic
TACTIC_HEADERS
nl_purify_tactic.h
)

View file

@ -16,4 +16,6 @@ z3_add_component(portfolio
smtlogic_tactics
subpaving_tactic
ufbv_tactic
TACTIC_HEADERS
default_tactic.h
)

View file

@ -10,4 +10,6 @@ z3_add_component(sls_tactic
tactic
PYG_FILES
sls_params.pyg
TACTIC_HEADERS
sls_tactic.h
)

View file

@ -28,4 +28,18 @@ z3_add_component(smtlogic_tactics
smt_tactic
PYG_FILES
qfufbv_tactic_params.pyg
TACTIC_HEADERS
nra_tactic.h
qfaufbv_tactic.h
qfauflia_tactic.h
qfbv_tactic.h
qfidl_tactic.h
qflia_tactic.h
qflra_tactic.h
qfnia_tactic.h
qfnra_tactic.h
qfuf_tactic.h
qfufbv_tactic.h
qfufnra_tactic.h
quant_tactics.h
)

View file

@ -11,4 +11,9 @@ z3_add_component(ufbv_tactic
normal_forms
rewriter
smt_tactic
TACTIC_HEADERS
macro_finder_tactic.h
quasi_macros_tactic.h
ufbv_rewriter_tactic.h
ufbv_tactic.h
)