I have to reuse a major C++ project which is currently developed inside eclipse, using CDT, mingw and cdt managed build feature (no external makefiles or build environment). The project itself is composed of many sub-projects.
I want to integrate that build into a continuous integration server (jenkins namely) and have thus to be able to automate the headless build.
So far, I managed to checkout the project (easy from jenkins) and have it build in a headless mode using eclipse, using the following command:
C:\prog\EclipseCdt\eclipse -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import %WORKSPACE%\project1 -import %WORKSPACE%\project2 -import %WORKSPACE%\project3 -build all
It's however not enough:
make
on linux or devenv
on windows)Any idea how to have this behaviour ?
Note that:
it looks like if I start eclipse from a cmd interactively,it forks, if started from a bat script, it doesn't. so putting the previous line in jenkins was enough to do the trick.
Notes:
-data
parameter to define location of your workbench (I clean build each time)--launcher.suppressErrors
: in case something goes awoc, prevents eclipse from displaying a pop up (which is actually not displayed, thus blocks build)Final (working !) command:
C:\prog\EclipseCdt\eclipse --launcher.suppressErrors -nosplash -data "%WORKSPACE%" -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import "%WORKSPACE%\project1" -import "%WORKSPACE%\project2" -import "%WORKSPACE%\project3" -build all
EDIT