Why does CDT build every project if I execute an Ant script? [message #225846] |
Fri, 24 October 2008 05:42  |
Eclipse User |
|
|
|
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 #225980 is a reply to message #225923] |
Mon, 27 October 2008 08:55   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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 #226117 is a reply to message #225846] |
Wed, 29 October 2008 11:50  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.30591 seconds