[CMake] How to handle a submodule existing twice in a project?

David Doria daviddoria at gmail.com
Thu May 17 19:15:43 EDT 2012


>
> Yeah. Well, in that case I'd simply check for the TestB target thats
> defined in TestB/CMakeLists.txt as condition for the top-levels
> add_subdirectory:
>
> if(NOT TARGET TestB)
>   add_subdirectory(TestB)
> endif()
>
> That should work.
>
> Andreas
>

Awesome, that seems to do the trick. Thanks!

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120517/3e52ba08/attachment.htm>


More information about the CMake mailing list