8

Is there any simple way to create a target where object files aren't linked? I need additional target only for tests if everything compiles for ARM. I don't want to create any executable (it would not link anyway), because my project will be finally a part of something much bigger, which has its own old stable make-based build system.

So I just need to compile sources. All tests are done with other, PC target compiled with gcc.

1 Answer 1

17

You can use an object library:

add_library(dummy OBJECT <source files>) 

See also:

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.