title: cl.exe /c - Command line warning D9002
body: <p>I'm trying to use Microsoft's compiler (<code>cl</code>) from the command line to produce unlinked object files:</p>
  <pre><code>cl /c /nologo /OUT:main.obj main.c
  </code></pre>
  <p><code>main.c</code> is an empty <code>main</code> function:</p>
  <pre><code>int main( void ) { return 0; }
  </code></pre>
  <p>The object file is generated, but <code>cl</code> outputs a few <code>D9002</code> warnings:</p>
  <pre><code>cl : Command line warning D9002 : ignoring unknown option '/OU'
  cl : Command line warning D9002 : ignoring unknown option '/OT'
  cl : Command line warning D9002 : ignoring unknown option '/O:'
  cl : Command line warning D9002 : ignoring unknown option '/Om'
  cl : Command line warning D9002 : ignoring unknown option '/Oa'
  cl : Command line warning D9002 : ignoring unknown option '/On'
  cl : Command line warning D9002 : ignoring unknown option '/O.'
  cl : Command line warning D9002 : ignoring unknown option '/Oo'
  cl : Command line warning D9002 : ignoring unknown option '/Ob'
  cl : Command line warning D9002 : ignoring unknown option '/Oj'
  </code></pre>
  <p>As I understand, these are linker options that are automatically passed to <code>cl</code>, since it's also used for linking.</p>
  <p>However in my case, as I don't invoke the linker (by specifying <code>/C</code>), it seems that <code>cl</code> gets confused by these unexpected default options.</p>
  <p>Is there a way to override these default options, or to suppress the output of these warnings?</p>