C ++跨平台构建自动化 [英] C++ cross platform build automation

查看:142
本文介绍了C ++跨平台构建自动化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个跨平台C ++项目,目标是在Linux,OSX和Windows上成功编译。我使用GNU Make来处理所有平台上的构建,gcc用于在Linux& OSX和cl.exe在Windows下的Cygwin下编译。我当前的工作流程包括在OSX下编码,然后在每个单独的平台上构建测试代码可移植性。这个过程有些费时,我想知道是否可以在一个步骤中自动在所有平台上构建。

I have a cross platform C++ project that targets and successfully compiles on Linux, OSX and Windows. I'm using GNU Make to handle the building on all platforms, gcc for compiling under Linux & OSX and cl.exe to compile under Cygwin on windows. My current workflow consists of coding under OSX and then building on each individual platform to test code portability. This process is somewhat time consuming and I was wondering if it is possible to automatically build on all platforms in one step?

推荐答案

我理解OP正确,问题不是替换make,而是如何在每个平台上启动构建。

If I understand the OP correctly, the question isn't about replacing make but how to launch the build on each platform?

我建议使用 http://jenkins-ci.org/ - 它是java,可以在Windows,Linux,OSX等上运行。它可以配置为同时启动构建作业所以任何时候你想做一个构建每个平台可以同时启动。

I'd suggest using http://jenkins-ci.org/ - it's java and can be run on Windows, Linux, OSX, etc. It can be configured to launch build jobs concurrently so that any time you want to do a build each platform could be launched simultaneously.

jenkins的学习曲线并不可怕,但是它可能需要3-4个小时才能正常工作,一旦你这么做是顺利的航行。

The learning curve for jenkins isn't terrible but it probably will take about 3-4 hours to get working right, once you do however it's smooth sailing.

如果你想成为亲,你可以让它轮询你的源代码库,它会提交后自动启动构建。

If you want to be pro, you can have it poll your source repo and it'll launch builds automatically after commits.

这篇关于C ++跨平台构建自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆