Integrating an eclipse/cdt-based build into continuous integration

后端 未结 1 1737
离开以前
离开以前 2021-02-02 02:29

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

1条回答
  •  甜味超标
    2021-02-02 02:59

    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:

    • you need to add -data parameter to define location of your workbench (I clean build each time)
    • as usual, blame windows and put quotes....
    • --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

    • added --launcher.suppressErrors

    0 讨论(0)
提交回复
热议问题