]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/graph/example/parallel-compile-time.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / graph / example / parallel-compile-time.cpp
index 271cdec66cc0c2afb9da3384b1498d0e0a25ab53..0b1475d55ec422a5c4c510f9c5e17e6b0c73f1c0 100644 (file)
@@ -117,9 +117,9 @@ typedef property_map < file_dep_graph2, vertex_color_t >::type color_map_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 < file_dep_graph2 >::vertices_size_type size_type;
   size_type n_vertices;
   file_in >> n_vertices;        // read in number of vertices
@@ -155,8 +155,8 @@ main()
     get(vertex_color, 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];