eclipse --launcher.suppressErrors -nosplash -data <path to a workspace> -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import <relative path to a specific project> -build <ProjectName/ProjectConfiguration> -markerType cdt -no-indexer
All the stuff in <..> needs to be filled in with your own paths and settings. E.g., if you have a project "MyProj" in "./projects/MyProj" with a build configuration "Debug", and wanted to use a workspace "WS" in your current directory, it would be something like:
eclipse --launcher.suppressErrors -nosplash -data WS -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import projects/MyProj -build MyProj/Debug -markerType cdt -no-indexer
As I think I mentioned, I never managed to get anything sensible to happen by using wildcards to import all the cinema hd projects under my current directory, so I have a Python script that works out a build order based on the contents of each project's .project file (i.e. the "references" section) and imports and builds each project and each configuration one at a time.
TBH though - we hope to be able to introduce CMake instead as soon as possible.
HTH
eclipse --launcher.suppressErrors -nosplash -data <path to a workspace> -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import <relative path to a specific project> -build <ProjectName/ProjectConfiguration> -markerType cdt -no-indexer
eclipse --launcher.suppressErrors -nosplash -data WS -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import projects/MyProj -build MyProj/Debug -markerType cdt -no-indexer
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.
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
whereis <libname>