[CMake] are target_compile_definitions not transitive in cmake 3.12.1?
Mario Emmenlauer
mario at emmenlauer.de
Thu Aug 30 18:32:03 EDT 2018
Sorry if this has been discussed before, I searched the mailing
list and google but could not find this exact issue (only [1] and
[2] that refer to library dependencies).
I have a case where it seems target_compile_definitions() is not
transitive (it is not passed down via libraries), is that possible?
I have a project that sets a PUBLIC definition on libA, and during
the build of libB that links libA the definition is applied. But the
definition does not pass down to executables linking libB. This is
confusing for me because library dependencies and includes seem to
be transitive (linking libB also links libA automatically).
Is it by design that target_compile_definitions() is not transitive
in cmake 3.12.1? Or am I doing something wrong?
[2] https://gitlab.kitware.com/cmake/cmake/issues/17633
[1] https://gitlab.kitware.com/cmake/cmake/issues/12435
All the best,
Mario Emmenlauer
--
BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203
Balanstr. 43 mailto: memmenlauer * biodataanalysis.de
D-81669 München http://www.biodataanalysis.de/
More information about the CMake
mailing list