[CMake] Using FetchContent fails when two subprojects have a target with the same name

Timothy Wrona tjwrona1992 at gmail.com
Tue Feb 19 23:32:31 EST 2019


I am having an issue with using FetchContent to grab two subprojects that
both contain a "doxygen" target to build the documentation.

Both of these subprojects need to be able to be built independently and
when built on their own they compile fine (along with their documentation),
but when I pull them into one project using "FetchContent" I get an error
saying I can't define the "doxygen" target more than once.

I imagine this kind of issue would come up all of the time when using a
"superbuild" pattern. Is there a typical way of handling this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190219/5e1e35d8/attachment.html>


More information about the CMake mailing list