0

The title says it all. I want a way equivalent to adding the "-c" flag in GCC.

Barry Smith
  • 281
  • 1
  • 4
  • 16
  • 1
    http://stackoverflow.com/a/5462006/400303 – Mohammad Dec 20 '15 at 07:28
  • Making a custom make script? That just seems completely and utterly unnecessarily over the top – Barry Smith Dec 20 '15 at 07:53
  • 2
    Possible duplicate of [How do I produce only an object file (\*.o) from a CMake build target?](http://stackoverflow.com/questions/4765222/how-do-i-produce-only-an-object-file-o-from-a-cmake-build-target) – usr1234567 Dec 20 '15 at 09:44

1 Answers1

1

Referred questions and answers look out of date (and strange some time). Nowadays CMake is capable to do exactly what you want. All that you need is to add an object library.

zaufi
  • 6,811
  • 26
  • 34