[CMake] CodeBlocks Generator misses custom targets

Alexander Neundorf a.neundorf-work at gmx.net
Sun Sep 6 05:45:05 EDT 2009


On Wednesday 05 August 2009, David Cole wrote:
> On Wed, Aug 5, 2009 at 4:57 PM, Alexander Neundorf
>
> <a.neundorf-work at gmx.net>wrote:
> > On Thursday 30 July 2009, David Cole wrote:
> > > That looks like line 201 in CMake-2-6-4 source tree. In CVS HEAD, this
> >
> > has
> >
> > > moved to line 390, but the same code is still there...
> > >
> > > Looks like that whole else chunk should be removed. Unless somebody can
> >
> > say
> >
> > > why it's there...?
> >
> > In order to keep some targets from appearing in the target list of C::B
> > (like
> > e.g. /Experimental.+/). Apparently it also filters out custom targets,
> > which
> > was not intended.
> > If the else-branch is removed, then actually the whole if-else tree can
> > be removed.
> > Is there a way to check whether such a target is a custom target ?
>
> I don't know of a way to do that, but you could:
>   SET_PROPERTY(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
> before including CTest.cmake to prevent those custom targets from being
> added...
>
> You could probably do that from the Code Blocks generator in C++ code if
> you wanted to.
>
> Better still might be to add logic to CTestTargets not to put those in IDEs
> where they don't make sense. (They don't make much sense in Visual Studio
> or Xcode either...)

I reworked that algorithm, it's in cvs HEAD.
Now all utility (custom) targets are added, and all global targets (like 
install) are added from the root directory, the helper targets for the 
Nightly/Experimental/Continuous builds are not added.

Alex


More information about the CMake mailing list