3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 09:34:08 +00:00

checkpoint

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-23 13:42:57 -07:00
parent 1d795e9a5e
commit c4898a67e3
5 changed files with 13 additions and 15 deletions

View file

@ -75,7 +75,7 @@ add_lib('portfolio', ['smtlogic_tactics', 'ufbv_strategy', 'fpa', 'aig', 'muz_qe
add_lib('api', ['portfolio', 'user_plugin'])
add_lib('array_property', ['ast', 'rewriter'])
add_exe('shell', ['api', 'sat', 'extra_cmds'], exe_name='z3')
add_exe('test', ['api', 'fuzzing', 'array_property'])
add_exe('test', ['api', 'fuzzing', 'array_property'], exe_name='test-z3')
# mk_vs_solution()

View file

@ -59,6 +59,9 @@ _ComponentNames = sets.Set()
_Name2Component = {}
_Processed_Headers = sets.Set()
def get_cpp_files(path):
return filter(lambda f: f.endswith('.cpp'), os.listdir(path))
def find_all_deps(name, deps):
new_deps = []
for dep in deps:
@ -154,8 +157,7 @@ class Component:
out.write(' -I%s' % _Name2Component[dep].to_src_dir)
out.write('\n')
mk_dir('%s/%s' % (BUILD_DIR, self.build_dir))
for cppfile in glob.glob(os.path.join(self.src_dir, '*.cpp')):
cppfile = os.path.basename(cppfile)
for cppfile in get_cpp_files(self.src_dir):
self.add_cpp_rules(out, include_defs, cppfile)
class LibComponent(Component):
@ -166,8 +168,7 @@ class LibComponent(Component):
Component.mk_makefile(self, out)
# generate rule for lib
objs = []
for cppfile in glob.glob(os.path.join(self.src_dir, '*.cpp')):
cppfile = os.path.basename(cppfile)
for cppfile in get_cpp_files(self.src_dir):
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
objs.append(objfile)
@ -184,14 +185,13 @@ class LibComponent(Component):
out.write('\n')
out.write('%s: %s\n\n' % (self.name, libfile))
# Auxiliary function for sort_components
def comp_components(c1, c2):
id1 = _Name2Component[c1].id
id2 = _Name2Component[c2].id
if id1 < id2: return -1
if id2 > id1: return 1
return 0
return id2 - id1
# Sort components based on definition time
# Sort components based on (reverse) definition time
def sort_components(cnames):
return sorted(cnames, cmp=comp_components)
@ -210,17 +210,16 @@ class ExeComponent(Component):
exefile = '%s$(EXE_EXT)' % self.exe_name
out.write('%s:' % exefile)
deps = sort_components(self.deps)
for dep in deps:
c_dep = _Name2Component[dep]
out.write(' %s/%s$(LIB_EXT)' % (c_dep.build_dir, c_dep.name))
objs = []
for cppfile in glob.glob(os.path.join(self.src_dir, '*.cpp')):
cppfile = os.path.basename(cppfile)
for cppfile in get_cpp_files(self.src_dir):
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
objs.append(objfile)
for obj in objs:
out.write(' ')
out.write(obj)
for dep in deps:
c_dep = _Name2Component[dep]
out.write(' %s/%s$(LIB_EXT)' % (c_dep.build_dir, c_dep.name))
out.write('\n')
out.write('\t$(LINK) $(LINK_OUT_FLAG)%s $(LINK_FLAGS)' % exefile)
for obj in objs:

View file

@ -167,7 +167,6 @@ int main(int argc, char ** argv) {
TST(interval_skip_list);
TST(no_overflow);
TST(memory);
TST(parallel);
TST(get_implied_equalities);
TST(arith_simplifier_plugin);
TST(quant_elim);