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

      • <bdo id='jq0eQ'></bdo><ul id='jq0eQ'></ul>
    1. <legend id='jq0eQ'><style id='jq0eQ'><dir id='jq0eQ'><q id='jq0eQ'></q></dir></style></legend>

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

        <tfoot id='jq0eQ'></tfoot>

        如何在 CMake 中使用 c++20 模块?

        How to use c++20 modules with CMake?(如何在 CMake 中使用 c++20 模块?)

        1. <legend id='9aAPB'><style id='9aAPB'><dir id='9aAPB'><q id='9aAPB'></q></dir></style></legend>
            <bdo id='9aAPB'></bdo><ul id='9aAPB'></ul>
            <tfoot id='9aAPB'></tfoot>

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

                  本文介绍了如何在 CMake 中使用 c++20 模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Clang 和 MSVC 已经支持 Modules TS 来自未完成的 C++20 标准.我可以使用 CMake 或其他构建系统构建基于模块的项目吗?

                  Clang and MSVC already supports Modules TS from unfinished C++20 standard. Can I build my modules based project with CMake or other build system and how?

                  我尝试了 build2,它支持模块并且运行良好,但我有一个 问题 关于它的依赖管理(UPD:问题已关闭).

                  I tried build2, it supports modules and it works very well, but i have a question about it's dependency management (UPD: question is closed).

                  推荐答案

                  CMake 目前不支持 C++20 模块.

                  CMake currently does not support C++20 modules.

                  另请参阅CMake 问题跟踪器中的相关问题.请注意,与插入新的编译器选项相比,支持模块需要来自构建系统的更多支持.它从根本上改变了在构建过程中必须如何处理源文件之间的依赖关系:在预模块世界中,所有 cpp 源文件都可以按任何顺序独立构建.使用不再正确的模块,这不仅对 CMake 本身有影响,而且对下游构建系统也有影响.

                  See also the relevant issue in the CMake issue tracker. Note that supporting modules requires far more support from the build system than inserting a new compiler option. It fundamentally changes how dependencies between source files have to be handled during the build: In a pre-modules world all cpp source files can be built independently in any order. With modules that is no longer true, which has implications not only for CMake itself, but also for the downstream build system.

                  查看 CMake Fortran 模块论文细节.从构建系统的角度来看,Fortran 模块的行为与 C++20 模块非常相似.

                  Take a look at the CMake Fortran modules paper for the gory details. From a build system's point of view, Fortran's modules behave very similar to the C++20 modules.

                  更新:CMake 3.20 引入了对带有 Ninja Generator 的模块的实验性支持(并且用于 Ninja).详细信息可以在相应的拉取请求中找到.在此阶段,此功能仍处于高度实验阶段, 用于生产用途.如果你打算玩这个,你真的应该阅读 Fortran 模块论文和依赖格式论文 以了解您正在了解的内容.

                  Update: CMake 3.20 introduces experimental support for Modules with the Ninja Generator (and only for Ninja). Details can be found in the respective pull request. At this stage, this feature is still highly experimental and not intended for production use. If you intend to play around with this anyway, you really should be reading both the Fortran modules paper and the dependency format paper to understand what you're getting into.

                  这篇关于如何在 CMake 中使用 c++20 模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

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

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

                          <tfoot id='D2FfI'></tfoot>

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