• <bdo id='5PJOp'></bdo><ul id='5PJOp'></ul>

    <small id='5PJOp'></small><noframes id='5PJOp'>

      1. <tfoot id='5PJOp'></tfoot>

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

        使用 CMake 生成 Visual Studio C++ 项目文件

        Using CMake to generate Visual Studio C++ project files(使用 CMake 生成 Visual Studio C++ 项目文件)
        <i id='2rmoD'><tr id='2rmoD'><dt id='2rmoD'><q id='2rmoD'><span id='2rmoD'><b id='2rmoD'><form id='2rmoD'><ins id='2rmoD'></ins><ul id='2rmoD'></ul><sub id='2rmoD'></sub></form><legend id='2rmoD'></legend><bdo id='2rmoD'><pre id='2rmoD'><center id='2rmoD'></center></pre></bdo></b><th id='2rmoD'></th></span></q></dt></tr></i><div id='2rmoD'><tfoot id='2rmoD'></tfoot><dl id='2rmoD'><fieldset id='2rmoD'></fieldset></dl></div>
          <bdo id='2rmoD'></bdo><ul id='2rmoD'></ul>

          • <legend id='2rmoD'><style id='2rmoD'><dir id='2rmoD'><q id='2rmoD'></q></dir></style></legend>

                <tbody id='2rmoD'></tbody>

              <tfoot id='2rmoD'></tfoot>

                  <small id='2rmoD'></small><noframes id='2rmoD'>

                  本文介绍了使用 CMake 生成 Visual Studio C++ 项目文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个开源 C++ 项目,用于在 Linux 和 Windows 上编译的代码.我使用 CMake 在 Linux 上构建代码.为了便于开发设置和政治原因,我必须坚持使用 Windows 上的 Visual Studio 项目文件/编辑器(我无法切换到 代码::块,例如).我看到使用 CMake 生成 Visual Studio 文件的说明,如此处.

                  I am working on an open source C++ project, for code that compiles on Linux and Windows. I use CMake to build the code on Linux. For ease of development setup and political reasons, I must stick to Visual Studio project files/editor on Windows (I can't switch to Code::Blocks, for example). I see instructions to generate Visual Studio files using CMake, as here.

                  您之前是否使用过 CMake 生成 Visual Studio 文件?您的体验如何?假设我想向我的项目添加一个新文件.这方面的工作流程是什么?

                  Have you used CMake to generate Visual Studio files before? How has been your experience? Suppose I want to add a new file to my project. What is the workflow for this?

                  推荐答案

                  CMake 实际上非常适合这个.关键是 Windows 端的每个人都必须记住在加载解决方案之前运行 CMake,而我们 Mac 端的每个人都必须记住在 make 之前运行它.

                  CMake is actually pretty good for this. The key part was everyone on the Windows side has to remember to run CMake before loading in the solution, and everyone on our Mac side would have to remember to run it before make.

                  最难的部分是作为 Windows 开发人员确保您的结构更改在 cmakelist.txt 文件中,而不是在解决方案或项目文件中,因为这些更改可能会丢失,即使没有丢失也不会转移到Mac 端也需要它们,Mac 人需要记住不要出于同样的原因修改 make 文件.

                  The hardest part was as a Windows developer making sure your structural changes were in the cmakelist.txt file and not in the solution or project files as those changes would probably get lost and even if not lost would not get transferred over to the Mac side who also needed them, and the Mac guys would need to remember not to modify the make file for the same reasons.

                  这只是需要一点思考和耐心,但一开始会有错误.但是,如果您在双方都使用持续集成,那么这些将很早就被淘汰,人们会最终养成习惯.

                  It just requires a little thought and patience, but there will be mistakes at first. But if you are using continuous integration on both sides then these will get shook out early, and people will eventually get in the habit.

                  这篇关于使用 CMake 生成 Visual Studio C++ 项目文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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?)
                    <bdo id='run5Z'></bdo><ul id='run5Z'></ul>

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

                        <tbody id='run5Z'></tbody>

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