How do I produce only an object file (*.o) from a CMake build target?

后端 未结 3 1321
南笙
南笙 2021-02-04 09:24

I\'m trying to build an object file using CMake, but I can\'t seem to get CMake to build something other than a complete executable. I\'m basically looking for the result of the

3条回答
  •  心在旅途
    2021-02-04 09:42

    I would go the custom command path. Remember you can still use those object files for compilation with CMake latter if you set the GENERATED and EXTERNAL_OBJECT source file properties.

提交回复
热议问题