[CMake] CodeBlocks Generator misses custom targets

David Cole david.cole at kitware.com
Wed Aug 5 17:31:42 EDT 2009


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...)


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


More information about the CMake mailing list