title: How to pass arguments to a Google Benchmark Program
body: <p>I have a C++ Google Benchmark Program. It uses Google's <code>BENCHMARK_MAIN()</code> method. Now I call and execute the compiled program with a Go script. Is there a way to pass arguments into my benchmark program? (I know the common way over a main method, but I'm not sure how to do it in Googletest, because it's implemented in <code>benchmark_api.h</code> and I can't just change that.)</p>
  
  <p>Update:</p>
  
  <p>So far I copied out the macro body into my <code>benchmark.cpp</code> and added a line. It is not a nice solution because possible changes from Google on this Macro (like a name changing or an added code line) wouldn't affect my copy. It is working at last.</p>
  
  <pre><code>int main (int argc, char** argv)
  {
      MyNamespace::conf = {argv[1]};
      ::benchmark::Initialize (&amp;argc, argv);
      ::benchmark::RunSpecifiedBenchmarks ();
  }
  </code></pre>