<bdo id='JZSKQ'></bdo><ul id='JZSKQ'></ul>
    <legend id='JZSKQ'><style id='JZSKQ'><dir id='JZSKQ'><q id='JZSKQ'></q></dir></style></legend>

  • <tfoot id='JZSKQ'></tfoot>
  • <small id='JZSKQ'></small><noframes id='JZSKQ'>

  • <i id='JZSKQ'><tr id='JZSKQ'><dt id='JZSKQ'><q id='JZSKQ'><span id='JZSKQ'><b id='JZSKQ'><form id='JZSKQ'><ins id='JZSKQ'></ins><ul id='JZSKQ'></ul><sub id='JZSKQ'></sub></form><legend id='JZSKQ'></legend><bdo id='JZSKQ'><pre id='JZSKQ'><center id='JZSKQ'></center></pre></bdo></b><th id='JZSKQ'></th></span></q></dt></tr></i><div id='JZSKQ'><tfoot id='JZSKQ'></tfoot><dl id='JZSKQ'><fieldset id='JZSKQ'></fieldset></dl></div>

        用于 C++ 的类似 Maven 的依赖管理?

        时间:2023-08-25

          <tfoot id='wdfo0'></tfoot>

            <small id='wdfo0'></small><noframes id='wdfo0'>

            <i id='wdfo0'><tr id='wdfo0'><dt id='wdfo0'><q id='wdfo0'><span id='wdfo0'><b id='wdfo0'><form id='wdfo0'><ins id='wdfo0'></ins><ul id='wdfo0'></ul><sub id='wdfo0'></sub></form><legend id='wdfo0'></legend><bdo id='wdfo0'><pre id='wdfo0'><center id='wdfo0'></center></pre></bdo></b><th id='wdfo0'></th></span></q></dt></tr></i><div id='wdfo0'><tfoot id='wdfo0'></tfoot><dl id='wdfo0'><fieldset id='wdfo0'></fieldset></dl></div>
            <legend id='wdfo0'><style id='wdfo0'><dir id='wdfo0'><q id='wdfo0'></q></dir></style></legend>

                <tbody id='wdfo0'></tbody>

                <bdo id='wdfo0'></bdo><ul id='wdfo0'></ul>
                • 本文介绍了用于 C++ 的类似 Maven 的依赖管理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  假设我有一个 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 内部调用 NAnt(我使用 NAnt 的功能直接构建 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 项目).

                  Initial Answer: 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.

                  他们还有很多关于如何查找项目所需的预安装构建库的模块(如 Boost、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
                    • 视觉工作室
                    • 生成文件
                    • XCode
                    • ...
                    • conan.io integrates with major build tools:
                      • CMake
                      • Visual Studio
                      • Makefile
                      • XCode
                      • ...

                      注意 正如@RAM 在评论中指出的那样,cpm 不再积极维护.

                      Note as pointed out by @RAM in the comments cpm is no longer actively maintained.

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

                  上一篇:制作配方以防止重建非依赖目标 下一篇:有什么好的 C++ 项目构建工具,可以代替 make 吗?

                  相关文章

                    <legend id='7lTfy'><style id='7lTfy'><dir id='7lTfy'><q id='7lTfy'></q></dir></style></legend>

                    <small id='7lTfy'></small><noframes id='7lTfy'>

                    <i id='7lTfy'><tr id='7lTfy'><dt id='7lTfy'><q id='7lTfy'><span id='7lTfy'><b id='7lTfy'><form id='7lTfy'><ins id='7lTfy'></ins><ul id='7lTfy'></ul><sub id='7lTfy'></sub></form><legend id='7lTfy'></legend><bdo id='7lTfy'><pre id='7lTfy'><center id='7lTfy'></center></pre></bdo></b><th id='7lTfy'></th></span></q></dt></tr></i><div id='7lTfy'><tfoot id='7lTfy'></tfoot><dl id='7lTfy'><fieldset id='7lTfy'></fieldset></dl></div>

                    1. <tfoot id='7lTfy'></tfoot>
                      • <bdo id='7lTfy'></bdo><ul id='7lTfy'></ul>