X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Flibs%2Fgraph%2Fexample%2Faccum-compile-times.cpp;h=d4db2cf4f08ee8bfc50be611656ef662fdba5bde;hb=92f5a8d42d07f9929ae4fa7e01342fe8d96808a8;hp=85af04826977d481530bd74d269b0ac65560e380;hpb=a0324939f9d0e1905d5df8f57442f09dc70af83d;p=ceph.git diff --git a/ceph/src/boost/libs/graph/example/accum-compile-times.cpp b/ceph/src/boost/libs/graph/example/accum-compile-times.cpp index 85af04826..d4db2cf4f 100644 --- a/ceph/src/boost/libs/graph/example/accum-compile-times.cpp +++ b/ceph/src/boost/libs/graph/example/accum-compile-times.cpp @@ -48,9 +48,9 @@ typedef graph_traits::vertex_descriptor vertex_t; typedef graph_traits::edge_descriptor edge_t; int -main() +main(int argc, const char** argv) { - std::ifstream file_in("makefile-dependencies.dat"); + std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat"); typedef graph_traits::vertices_size_type size_type; size_type n_vertices; file_in >> n_vertices; // read in number of vertices @@ -76,8 +76,8 @@ main() name_map_t name_map = get(vertex_name, g); compile_cost_map_t compile_cost_map = get(vertex_compile_cost, g); - std::ifstream name_in("makefile-target-names.dat"); - std::ifstream compile_cost_in("target-compile-costs.dat"); + std::ifstream name_in(argc >= 3 ? argv[2] : "makefile-target-names.dat"); + std::ifstream compile_cost_in(argc >= 4 ? argv[3] : "target-compile-costs.dat"); graph_traits < file_dep_graph2 >::vertex_iterator vi, vi_end; for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) { name_in >> name_map[*vi];