Maven的依赖一样管理C ++? [英] Maven-like dependency management for C++?

查看:950
本文介绍了Maven的依赖一样管理C ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有一个在多个子项目分裂一个C ++项目。都产生一个DLL和开发不同团队的子项目在每个子项目的工作。现在,如果我想建立的主要项目,是有办法,以避免由我自己来构建所有的子项目?

Say I have a C++ project that is split in several subprojects. The subproject all produce a DLL and different teams of developers work on each of the subproject. Now if I want to build the main project, is there a way to avoid having to build all the subprojects by myself?

总之,我在找东西做的依赖管理(即二进制文件和头)作为Maven的做一个Java的类似的方式。

In short, I'm looking for something that does the dependency management (i.e. for binary files and headers) in a similar way as Maven does for Java.

其实,我试图使用Maven这个但这是相当麻烦的,因为我必须手动和相当频繁,Maven的偏出拿起最新的更改创建包。此外,在运行编译是一个黑客位,因为我要调用南特从内部的Maven(我用楠的功能直接建立的Visual Studio解决方案)。

In fact, I tried to use Maven for this but this is rather cumbersome because I have to create the packages manually and quite frequently, Maven misses to pick up the most recent changes. Also, running the compilation is a bit of a hack as I have to call NAnt from within Maven (I use NAnt's feature to build Visual Studio solutions directly).

如何做到这一点的任何提示和想法?

Any hints and ideas of how to do this?

推荐答案

我建议使用CMake的。这是一个多平台的make文件生成器(生成Visual Studio或Eclipse CDT的项目以及)。

I would suggest using CMake. It is a multi-platform make file generator (generates Visual Studio or Eclipse CDT projects as well).

http://www.cmake.org/

我与它真的很好的经验。我喜欢它的最好的事情是生产通用的项目结构的能力。所以,你可以一般包括分项目查表单元测试等,不用每次都改变脚本。

I did really good experience with it. The best thing I like about it was the ability to produce generic project structure. So you can generically include sub-projects look-up for unit tests etc. without changing the script every time.

他们也有很多的模块如何找到pre-安装构建库,项目所需(如升压,QT等)

They have also lots of modules on how to find pre-installed build libraries, required for the project (like Boost, QT etc.)

更新:在平均时间出现了一些努力,推出包管理C ++。一些值得看的项目:

Update: In the mean time there was some effort to introduce package management for C++. Some projects worth looking at:


  • conan.io 与主要的构建工具集成:

    • 的CMake

    • 的Visual Studio

    • 的Makefile

    • X code
    • ...

    • conan.io integrates with major build tools:
      • CMake
      • Visual Studio
      • Makefile
      • XCode
      • ...

      这篇关于Maven的依赖一样管理C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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