Re: [CMake] Remove custom targets

2011-07-04 Thread Michael Hertling
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 decl

Re: [CMake] Remove custom targets

2011-07-04 Thread Glenn Coombs
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

[CMake] Remove custom targets

2011-07-04 Thread Joe H
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 unins