Просмотр исходного кода

docs: update warning on undefined variables in api-guides/build-system

Linda 3 лет назад
Родитель
Сommit
0a8a67ecd0
2 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      docs/en/api-guides/build-system.rst
  2. 2 2
      docs/zh_CN/api-guides/build-system.rst

+ 2 - 2
docs/en/api-guides/build-system.rst

@@ -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.
 

+ 2 - 2
docs/zh_CN/api-guides/build-system.rst

@@ -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/` 中支持的函数。