CodeBlocks Generator misses custom targets

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

CodeBlocks Generator misses custom targets

Pierre-Julien VILLOUD-3

Hi everyone,

 

When using CodeBlocks MinGW Makefiles Generator, the project generated does not contain the custom targets I created.

I don’t know if this is meant to be, but I would like all the targets I created to be in the project.

 

So I just commented the line 201 (the “break” statement) in cmExtraCodeBlocksGenerator.cxx file and it works…

 

I hope somebody will find it useful !

 

Pierre-Julien


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: CodeBlocks Generator misses custom targets

David Cole
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...?


On Thu, Jul 30, 2009 at 5:41 AM, Pierre-Julien Villoud <[hidden email]> wrote:

Hi everyone,

 

When using CodeBlocks MinGW Makefiles Generator, the project generated does not contain the custom targets I created.

I don’t know if this is meant to be, but I would like all the targets I created to be in the project.

 

So I just commented the line 201 (the “break” statement) in cmExtraCodeBlocksGenerator.cxx file and it works…

 

I hope somebody will find it useful !

 

Pierre-Julien


_______________________________________________
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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: CodeBlocks Generator misses custom targets

Pierre-Julien VILLOUD-3

Yes sorry, I did not precise that it was 2.6.4 source tree. Are you saying that if I take CVS HEAD, and I compile it, I will have all the target I created in the CodeBlocks project ?

 

De : David Cole [mailto:[hidden email]]
Envoyé : jeudi 30 juillet 2009 12:00
À : Pierre-Julien Villoud
Cc : cmake
Objet : Re: [CMake] CodeBlocks Generator misses custom targets

 

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

On Thu, Jul 30, 2009 at 5:41 AM, Pierre-Julien Villoud <[hidden email]> wrote:

Hi everyone,

 

When using CodeBlocks MinGW Makefiles Generator, the project generated does not contain the custom targets I created.

I don’t know if this is meant to be, but I would like all the targets I created to be in the project.

 

So I just commented the line 201 (the “break” statement) in cmExtraCodeBlocksGenerator.cxx file and it works…

 

I hope somebody will find it useful !

 

Pierre-Julien


_______________________________________________
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

 


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: CodeBlocks Generator misses custom targets

Pierre-Julien VILLOUD-3

Yes this correspond to line 390 in CVS HEAD. I did not see any bugs with commenting that line. Of course I did not do an exhaustive test…

 

De : [hidden email] [mailto:[hidden email]] De la part de Pierre-Julien Villoud
Envoyé : jeudi 30 juillet 2009 13:45
À : David Cole
Cc : cmake
Objet : Re: [CMake] CodeBlocks Generator misses custom targets

 

Yes sorry, I did not precise that it was 2.6.4 source tree. Are you saying that if I take CVS HEAD, and I compile it, I will have all the target I created in the CodeBlocks project ?

 

De : David Cole [mailto:[hidden email]]
Envoyé : jeudi 30 juillet 2009 12:00
À : Pierre-Julien Villoud
Cc : cmake
Objet : Re: [CMake] CodeBlocks Generator misses custom targets

 

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

On Thu, Jul 30, 2009 at 5:41 AM, Pierre-Julien Villoud <[hidden email]> wrote:

Hi everyone,

 

When using CodeBlocks MinGW Makefiles Generator, the project generated does not contain the custom targets I created.

I don’t know if this is meant to be, but I would like all the targets I created to be in the project.

 

So I just commented the line 201 (the “break” statement) in cmExtraCodeBlocksGenerator.cxx file and it works…

 

I hope somebody will find it useful !

 

Pierre-Julien


_______________________________________________
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

 


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: CodeBlocks Generator misses custom targets

Alexander Neundorf-3
In reply to this post by David Cole
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 ?

Alex
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: CodeBlocks Generator misses custom targets

David Cole
On Wed, Aug 5, 2009 at 4:57 PM, Alexander Neundorf <[hidden email]> 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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: CodeBlocks Generator misses custom targets

Alexander Neundorf-3
On Wednesday 05 August 2009, David Cole wrote:

> On Wed, Aug 5, 2009 at 4:57 PM, Alexander Neundorf
>
> <[hidden email]>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
_______________________________________________
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