<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 的依赖管理?

        Maven-like dependency management for C++?(用于 C++ 的类似 Maven 的依赖管理?)

          <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 的依赖管理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                      本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                  How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                  Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                  Delay Loading DLLs(延迟加载 DLL)
                  Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                  Loading a dll from a dll?(从 dll 加载 dll?)

                      <tbody id='7lTfy'></tbody>
                    <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>

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