title: Can cmake compile directly from source files to binary?
body: <p>cmake compiles first the .c files to .o files, and then links them together:</p>
  
  <pre><code>gcc a.c -o a.c.o
  gcc b.c -o b.c.o
  gcc c.c -o c.c.o
  gcc a.c.o b.c.o c.c.o -o a.out
  </code></pre>
  
  <p>That instead of compiling directly from source files to binary:</p>
  
  <pre><code>gcc a.c b.c c.c -o a.out
  </code></pre>
  
  <p>Normally I would have used link-time-optimization (<code>-flto</code>) to allow the compiler to do cross-binary optimization, but unfortunately, I have to use an old compiler that doesn't support link-time-optimization.</p>
  
  <p>That means, that if I use cmake, my binary comes out 3 times larger than if I compile directly from source files to binary, because of the lack of cross-binary optimization</p>
  
  <p>Do you know a way to make cmake compile directly from source files to binary, or do you know an alternative way to solve this?</p>