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

          <bdo id='7YCvn'></bdo><ul id='7YCvn'></ul>

      1. <small id='7YCvn'></small><noframes id='7YCvn'>

      2. <tfoot id='7YCvn'></tfoot>

        如何使用 CMAKE_EXPORT_COMPILE_COMMANDS?

        How to use CMAKE_EXPORT_COMPILE_COMMANDS?(如何使用 CMAKE_EXPORT_COMPILE_COMMANDS?)

            • <legend id='fv72y'><style id='fv72y'><dir id='fv72y'><q id='fv72y'></q></dir></style></legend>

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

                  <bdo id='fv72y'></bdo><ul id='fv72y'></ul>

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

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

                  问题描述

                  我一直在尝试将 clang-modernizeCMAKE_EXPORT_COMPILE_COMMANDS 结合使用,如在此工具的帮助中推荐的那样.

                  I've been trying to use clang-modernize with CMAKE_EXPORT_COMPILE_COMMANDS as recommended in the help of this tool.

                  使用此选项,cmake 会生成一个包含编译信息的 JSON 文件,例如包含路径(另见).

                  With this option cmake generates a JSON file containing compile info like include paths (see also).

                  这个变量在cmake的命令行中被接受,但是 cmake --help-variable CMAKE_EXPORT_COMPILE_COMMANDS 不起作用(这与 此邮件列表发布).

                  This variable is accepted on the command line of cmake, but cmake --help-variable CMAKE_EXPORT_COMPILE_COMMANDS doesn't work (which is coherent with this mailing list posting).

                  有人知道如何使用它吗?

                  Has someone any idea on how to use it?

                  我也可以将它与 cppcheck 一起使用.

                  I could also use it with cppcheck.

                  更多信息

                  我在 clang 开发者论坛 指出此 cmake 功能并非在所有生成器上都可用.这在未来可能会改变,同时我的问题仍然存在,我也会尝试看看如果我使用 Visual Studio 以外的其他生成器会发生什么.

                  I've discovered on a clang developer forum that this cmake feature is not available on all generators. This might change in the future, in the mean time my question remains and I will try too see what happen if I use other generators than Visual Studio.

                  推荐答案

                  我建议设置

                  set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
                  

                  在 CMakeList.txt 中

                  in the CMakeList.txt

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

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

                  相关文档推荐

                  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='VjKGt'></bdo><ul id='VjKGt'></ul>

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

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

                            <tbody id='VjKGt'></tbody>