[CMake] Building arguments to target_comple_definitions()

Chuck Atkins chuck.atkins at kitware.com
Thu Oct 11 15:54:44 EDT 2018


>
> So, are you suggesting that I make a “dummy” target and fill it with the
> common options in compile_definitions() and include_directories() (et. al.)
>
> Then make my OBJECT libraries (and the shared library) depend on the
> “dummy” target?
>

>
> If that’s not the suggestion, I’m afraid I don’t see how I can use this to
> set the common flags
>

That's certainly one way you can solve the problem, i.e. making an
interface library with the common defs, and a good idea at that, but that's
not what I was referring to.  I was simply tying to explain that the error
your getting trying to pass arguments to target_compile_options is because
you're missing the visibility argument.

- Chuck

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20181011/fb28f3a7/attachment.html>


More information about the CMake mailing list