On 07/05/2011 01:40 AM, Glenn Coombs wrote: > If you can modify the subdirectory cmakefiles then maybe you could protect > the declaration of the uninstall target like this: > > if (NOT TARGET uninstall) > add_custom_target(uninstall ...) > endif() > > That way if the top level cmakefile declares an uninstall target it should > prevent the subdirectory versions from being declared. > > -- > Glenn
There's also the ALLOW_DUPLICATE_CUSTOM_TARGETS global property, but this is restricted to Makefile generators only. Regards, Michael > On 4 July 2011 17:33, Joe H <[email protected]> wrote: > >> Hi all! >> >> I have a project, which pulls in a bunch of sub-projects, using >> add_subdirectory. >> >> The problem is that these projects all create a custom target called >> uninstall. Obviously, when these projects are pulled together, the uninstall >> targets clash. >> An ideal solution would be to ignore the uninstall targets in >> the subdirectories, and just pay attention to the one at the root. Is this >> at all possible? >> >> Thanks! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
