Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Headless build on 2021-03 building multiple times
Headless build on 2021-03 building multiple times [message #1840615] Tue, 20 April 2021 17:01 Go to next message
John McCabe is currently offline John McCabeFriend
Messages: 226
Registered: July 2009
Senior Member
Hi,

I'm trying to use the headless build feature on Eclipse 2021-03, but I'm finding that it's building 4 times for each configuration. Can anyone suggest why this might be?

For background, I have multiple projects I'm trying to build, but I'm doing one at a time using a command of the form:

eclipse --launcher.suppressErrors -nosplash -data", eclipseWorkspace -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import <projectPath> -build <projectName>/<config>


What I'm getting out (timestamped lines only), for example for the Debug configuration of my BitFieldTest project is of the form:

10:27:19 **** Build of configuration Debug for project BitFieldTest ****
10:27:20 Build Finished. 0 errors, 0 warnings. (took 854ms)
10:27:26 **** Build of configuration Debug for project BitFieldTest ****
10:27:27 Build Finished. 0 errors, 0 warnings. (took 922ms)
10:27:27 **** Build of configuration Debug for project BitFieldTest ****
10:27:28 Build Finished. 0 errors, 0 warnings. (took 695ms)
10:27:28 **** Build of configuration Debug for project BitFieldTest ****
10:27:28 Build Finished. 0 errors, 0 warnings. (took 724ms)


Does anyone have any clue why it would go through this 4 times?

I don't know if this is relevant (it certainly shouldn't be, but seems worth mentioning in case it's more than a coincidence), but each project has 4 configurations; Debug, Release, DebugCross, ReleaseCross. However I'm explicitly providing the choice of configuration so expect it to be built only once.

[Updated on: Tue, 20 April 2021 17:07]

Report message to a moderator

Re: Headless build on 2021-03 building multiple times [message #1840616 is a reply to message #1840615] Tue, 20 April 2021 17:36 Go to previous messageGo to next message
John McCabe is currently offline John McCabeFriend
Messages: 226
Registered: July 2009
Senior Member
Interestingly, this behaviour is different if I add the -no-indexer option; if I do that, the project appears to only be built once (as it should be).

Sounds like a bug to me.
Re: Headless build on 2021-03 building multiple times [message #1855054 is a reply to message #1840615] Mon, 26 September 2022 14:59 Go to previous message
Sebastián Paniagua is currently offline Sebastián PaniaguaFriend
Messages: 1
Registered: September 2022
Junior Member
Sorry, this message must be coming a bit late.

I had the same behaviour in a headless build and the reason was that I had the "Build all configurations in each project" option selected.

When I changed to "Build active configuration in each project" the behaviour disappeared.

This option can be found in the menu "Window" -> "Preferences" -> "C/C++" -> "Build".

Kind Regards
Previous Topic:build.py works when called from Shell but not when called from Eclipse
Next Topic:Setup debug
Goto Forum:
  


Current Time: Sat Feb 04 01:42:11 GMT 2023

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

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

Back to the top