Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Why does CDT build every project if I execute an Ant script?
Why does CDT build every project if I execute an Ant script? [message #225846] Fri, 24 October 2008 05:42 Go to next message
Eclipse UserFriend
Originally posted by: 4cs6fcg02.sneakemail.com

Hi all,

If I execute a target of an Ant script (in a Java project), the CDT
builder runs for every project it is enabled on, even if these have
nothing to do with the project that I run the Ant script on. This is
very annoying and it wastes time. I have ‘Build automatically’ selected
in Window → Preferences → General → Workspace.

Ok, I found now that I can uncheck ‘Open console when building’ under
the C/C++ prefs, which will save me from seeing the messages flash by,
but it still happens in the background and wastes time. Can I disable this?

H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Re: Why does CDT build every project if I execute an Ant script? [message #225906 is a reply to message #225846] Fri, 24 October 2008 10:27 Go to previous messageGo to next message
Eclipse UserFriend
Hendrik Maryns wrote:

> Hi all,

> If I execute a target of an Ant script (in a Java project), the CDT
> builder runs for every project it is enabled on, even if these have
> nothing to do with the project that I run the Ant script on. This is
> very annoying and it wastes time. I have ‘Build automatically’ selected
> in Window → Preferences → General → Workspace.

Well, this is exactly because you have Build automatically enabled. CDT
always triggers a full build and delegates responsibility to determine
what to build (if anything at all) to make command. If you use your own
make command it should handle the dependencies itself and build only what
is necessary.

Andrew

> Ok, I found now that I can uncheck ‘Open console when building’ under
> the C/C++ prefs, which will save me from seeing the messages flash by,
> but it still happens in the background and wastes time. Can I disable this?

> H.
Re: Why does CDT build every project if I execute an Ant script? [message #225914 is a reply to message #225906] Fri, 24 October 2008 10:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 4cs6fcg02.sneakemail.com

Andrew Gvozdev schreef:
> Hendrik Maryns wrote:
>
>> Hi all,
>
>> If I execute a target of an Ant script (in a Java project), the CDT
>> builder runs for every project it is enabled on, even if these have
>> nothing to do with the project that I run the Ant script on. This is
>> very annoying and it wastes time. I have �Build automatically�
>> selected
>> in Window � Preferences � General � Workspace.
>
> Well, this is exactly because you have Build automatically enabled. CDT
> always triggers a full build and delegates responsibility to determine
> what to build (if anything at all) to make command. If you use your own
> make command it should handle the dependencies itself and build only
> what is necessary.

Of course, my makefile takes care of dependencies. But that still means
I see all ‘Entering directory’ etc. messages flashing by.

By ‘Full build’, do you mean workspace-wide? Why is that? Isn’t that
what project dependencies are for?

H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Re: Why does CDT build every project if I execute an Ant script? [message #225923 is a reply to message #225914] Fri, 24 October 2008 12:04 Go to previous messageGo to next message
Eclipse UserFriend
Hendrik Maryns wrote:

> Andrew Gvozdev schreef:
>> Hendrik Maryns wrote:
>>
>>> Hi all,
>>
>>> If I execute a target of an Ant script (in a Java project), the CDT
>>> builder runs for every project it is enabled on, even if these have
>>> nothing to do with the project that I run the Ant script on. This is
>>> very annoying and it wastes time. I have âᅵᅵBuild
automaticallyâᅵᅵ
>>> selected
>>> in Window âᅵᅵ Preferences âᅵᅵ General âᅵᅵ Workspace.
>>
>> Well, this is exactly because you have Build automatically enabled. CDT
>> always triggers a full build and delegates responsibility to determine
>> what to build (if anything at all) to make command. If you use your own
>> make command it should handle the dependencies itself and build only
>> what is necessary.

> Of course, my makefile takes care of dependencies. But that still means
> I see all ‘Entering directory’ etc. messages flashing by.

I agree with you that it is not ideal for C++ projects but that's just how
it is. If it is too big roadblock (which I agree that it is) I suppose
somebody would take the pain to volunteer and improve it.

> By ‘Full build’, do you mean workspace-wide? Why is that? Isn’t that
> what project dependencies are for?

Full build as opposed to Incremental build. Incremental build means that
the builder takes care of dependencies, building incrementally. Consider
that CDT builder would figure that no build is necessary and not to go to
the trouble of "make all". But instead it delegates to make command.

Andrew
> H.
Re: Why does CDT build every project if I execute an Ant script? [message #225980 is a reply to message #225923] Mon, 27 October 2008 08:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 4cs6fcg02.sneakemail.com

Andrew Gvozdev schreef:
> Hendrik Maryns wrote:
>
>> Andrew Gvozdev schreef:
>>> Hendrik Maryns wrote:
>>>
>>>> Hi all,
>>>
>>>> If I execute a target of an Ant script (in a Java project), the CDT
>>>> builder runs for every project it is enabled on, even if these have
>>>> nothing to do with the project that I run the Ant script on. This is
>>>> very annoying and it wastes time. I have âᅵᅵBuild
> automaticallyâᅵᅵ
>>>> selected
>>>> in Window âᅵᅵ Preferences âᅵᅵ General âᅵᅵ Workspace.
>>>
>>> Well, this is exactly because you have Build automatically enabled. CDT
>>> always triggers a full build and delegates responsibility to determine
>>> what to build (if anything at all) to make command. If you use your own
>>> make command it should handle the dependencies itself and build only
>>> what is necessary.
>
>> Of course, my makefile takes care of dependencies. But that still means
>> I see all �Entering directory� etc. messages flashing by.
>
> I agree with you that it is not ideal for C++ projects but that's just
> how it is. If it is too big roadblock (which I agree that it is) I
> suppose somebody would take the pain to volunteer and improve it.
>
>> By �Full build�, do you mean workspace-wide? Why is that?
>> Isn�t that
>> what project dependencies are for?
>
> Full build as opposed to Incremental build. Incremental build means that
> the builder takes care of dependencies, building incrementally. Consider
> that CDT builder would figure that no build is necessary and not to go
> to the trouble of "make all". But instead it delegates to make command.

Understand.

But I am still bothered why it does a build of totally unrelated
projects if I save a file in another project, or launch a program or
whatever.

H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Re: Why does CDT build every project if I execute an Ant script? [message #225987 is a reply to message #225980] Mon, 27 October 2008 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Hendrik Maryns wrote:

> Andrew Gvozdev schreef:
>> Hendrik Maryns wrote:
>>
>>> Andrew Gvozdev schreef:
>>>> Hendrik Maryns wrote:
>>>>
>>>>> Hi all,
>>>>
>>>>> If I execute a target of an Ant script (in a Java project), the CDT
>>>>> builder runs for every project it is enabled on, even if these have
>>>>> nothing to do with the project that I run the Ant script on. This is
>>>>> very annoying and it wastes time. I have âᅵᅵBuild
>> automaticallyâᅵᅵ
>>>>> selected
>>>>> in Window âᅵᅵ Preferences âᅵᅵ General
âᅵᅵ Workspace.
>>>>
>>>> Well, this is exactly because you have Build automatically enabled. CDT
>>>> always triggers a full build and delegates responsibility to determine
>>>> what to build (if anything at all) to make command. If you use your own
>>>> make command it should handle the dependencies itself and build only
>>>> what is necessary.
>>
>>> Of course, my makefile takes care of dependencies. But that still means
>>> I see all âᅵᅵEntering directoryâᅵᅵ etc. messages flashing by.
>>
>> I agree with you that it is not ideal for C++ projects but that's just
>> how it is. If it is too big roadblock (which I agree that it is) I
>> suppose somebody would take the pain to volunteer and improve it.
>>
>>> By âᅵᅵFull buildâᅵᅵ, do you mean workspace-wide? Why is that?
>>> Isnâᅵᅵt that
>>> what project dependencies are for?
>>
>> Full build as opposed to Incremental build. Incremental build means that
>> the builder takes care of dependencies, building incrementally. Consider
>> that CDT builder would figure that no build is necessary and not to go
>> to the trouble of "make all". But instead it delegates to make command.

> Understand.

> But I am still bothered why it does a build of totally unrelated
> projects if I save a file in another project, or launch a program or
> whatever.
If "Build automatically" is selected then *every" project in the workspace
is build i.e. its builder is called. This is okay for Java projects where
the build step is very fast but very annoying for C/C++ projects.
Therefore, the CDT usually disables this option.
You can prevent a rebuild when you launch a program if you unselect "Build
before launching" in Windows->Preferences->Run/Debug->Launching->General
Options

Axel
Re: Why does CDT build every project if I execute an Ant script? [message #226008 is a reply to message #225846] Mon, 27 October 2008 17:56 Go to previous messageGo to next message
Eclipse UserFriend
Fri, 24 Oct 2008 11:42:13 +0200, /Hendrik Maryns/:

> If I execute a target of an Ant script (in a Java project), the CDT
> builder runs for every project it is enabled on, even if these have
> nothing to do with the project that I run the Ant script on. This is
> very annoying and it wastes time. I have ‘Build automatically’ selected
> in Window → Preferences → General → Workspace.

Every Ant run configuration (Run -> External Tools -> External Tools
Configurations...) has a "Build before launch" option (at the
"Build" tab) which is checked by default - see if unchecking it will
make any difference.

--
Stanimir
Re: Why does CDT build every project if I execute an Ant script? [message #226117 is a reply to message #225846] Wed, 29 October 2008 11:50 Go to previous message
Eclipse UserFriend
Check your Ant launch configuration. There is an option to control what gets built before the launch
is executed. This may help.

Dave Kelsey


Hendrik Maryns wrote:
> Hi all,
>
> If I execute a target of an Ant script (in a Java project), the CDT
> builder runs for every project it is enabled on, even if these have
> nothing to do with the project that I run the Ant script on. This is
> very annoying and it wastes time. I have ‘Build automatically’ selected
> in Window → Preferences → General → Workspace.
>
> Ok, I found now that I can uncheck ‘Open console when building’ under
> the C/C++ prefs, which will save me from seeing the messages flash by,
> but it still happens in the background and wastes time. Can I disable this?
>
> H.
Previous Topic:Trigger-happy task tags
Next Topic:Help!!! Cant run CDT
Goto Forum:
  


Current Time: Tue Jul 15 08:01:50 EDT 2025

Powered by FUDForum. Page generated in 0.30591 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top