Issue
We use Eclipse to build our projects.
In Jenkins we have a build script which runs over the projects and imports them to eclipse for it to build.
The issue I have is that all build configurations are built on every build from the commandline. (Release, release_shared, release_static, Debug, debug_shared, debug_static)
This not only takes a huge amount of time but for many projects some of these configurations are not needed to be monitored yet. What I am asking is there a commandline switch of specifying the project and then the specific build configuration to use.
using msbuild I would do the following
msbuild test.vcxproj /property:Configuration=Release
this would build the test project with the Release configuration.
In the documentation it suggests incremental build, clean, all but this is confusing as these all do a similar thing when actioned. There is also a switch for architecture type but nothing I can find that would point to project configuration as a whole.
Does this ability exist in eclipse ?
Solution
After hours of searching and playing with Eclipse I seem to have come up with the solution offered up by this https://gnu-mcu-eclipse.github.io/advanced/headless-builds/
eclipse -nosplash
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-import {[uri:/]/path/to/project}
-build {project/configuration} or all
-cleanBuild {project/configuration} or all
I was looking for a command line switch but it's built into the build or cleanbuild switches.
Hope this helps others with the same issue.
Answered By - JamesD
Answer Checked By - Katrina (JavaFixing Volunteer)