From: crouzet Date: Mon, 15 Jun 2020 09:05:09 +0000 (+0200) Subject: compile build products before the other X-Git-Tag: 5.6.0~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=354d5938464e316ced242632e5b0f8f5640d2cf6;p=tools%2Fsat.git compile build products before the other --- diff --git a/commands/compile.py b/commands/compile.py index 825e7b2..90b5858 100644 --- a/commands/compile.py +++ b/commands/compile.py @@ -699,20 +699,25 @@ def run(args, runner, logger): visited_nodes,sorted_nodes=depth_first_topo_graph(all_products_graph, n, visited_nodes,sorted_nodes) logger.write("Complete dependency graph topological search (sorting): %s\n" % sorted_nodes, 6) -# use the sorted list of all products to sort the list of products we have to compile + # Create a dict of all products to facilitate products_infos sorting + all_products_dict={} + for (pname,pinfo) in all_products_infos: + all_products_dict[pname]=(pname,pinfo) + + # Use the sorted list of all products to sort the list of products we have to compile sorted_product_list=[] + # first loop on compile time products, we need to compile them before! + for n in sorted_nodes: + if n in products_list: + if src.product.product_is_compile_time(all_products_dict[n][1]): + sorted_product_list.append(n) for n in sorted_nodes: if n in products_list: - sorted_product_list.append(n) + if not src.product.product_is_compile_time(all_products_dict[n][1]): + sorted_product_list.append(n) logger.write("Sorted list of products to compile : %s\n" % sorted_product_list, 5) - # from the sorted list of products to compile, build a sorted list of products infos - # a- create a dict to facilitate products_infos sorting - all_products_dict={} - for (pname,pinfo) in all_products_infos: - all_products_dict[pname]=(pname,pinfo) - # b- build a sorted list of products infos in products_infos products_infos=[] for product in sorted_product_list: products_infos.append(all_products_dict[product])