mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'docs/update_warning_undefined_variable_build_system' into 'master'
docs: update warning on undefined variables in api-guides/build-system Closes DOC-3812 See merge request espressif/esp-idf!20559
This commit is contained in:
commit
ba663acf97
@ -696,9 +696,9 @@ It also defines an overridden custom version of the built-in CMake_ ``project``
|
||||
Warning On Undefined Variables
|
||||
------------------------------
|
||||
|
||||
By default, ``idf.py`` passes the ``--warn-uninitialized`` flag to CMake_ so it will print a warning if an undefined variable is referenced in the build. This can be very useful to find buggy CMake files.
|
||||
By default, the function of warnings on undefined variables is disabled.
|
||||
|
||||
If you don't want this behaviour, it can be disabled by passing ``--no-warnings`` to ``idf.py``.
|
||||
To enable this function, we can pass the ``--warn-uninitialized`` flag to CMake_ or pass the ``--cmake-warn-uninitialized`` flag to ``idf.py`` so it will print a warning if an undefined variable is referenced in the build. This can be very useful to find buggy CMake files.
|
||||
|
||||
Browse the :idf_file:`/tools/cmake/project.cmake` file and supporting functions in :idf:`/tools/cmake/` for more details.
|
||||
|
||||
|
@ -696,9 +696,9 @@ CMake 调试
|
||||
警告未定义的变量
|
||||
------------------
|
||||
|
||||
默认情况下,``idf.py`` 在调用 CMake_ 时会给它传递 ``--warn-uninitialized`` 标志,如果在构建的过程中引用了未定义的变量,CMake_ 会打印警告。这对查找有错误的 CMake 文件非常有用。
|
||||
默认情况下,警告未定义的变量这一功能是关闭的。
|
||||
|
||||
如果您不想启用此功能,可以给 ``idf.py`` 传递 ``--no-warnings`` 标志。
|
||||
可通过将 ``--warn-uninitialized`` 标志传递给 CMake_ 或通过将 ``--cmake-warn-uninitialized`` 传递给 ``idf.py`` 来使能这一功能。这样,如果在构建的过程中引用了未定义的变量,CMake_ 会打印警告。这对查找有错误的 CMake 文件非常有用。
|
||||
|
||||
更多信息,请参考文件 :idf_file:`/tools/cmake/project.cmake` 以及 :idf:`/tools/cmake/` 中支持的函数。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user