Merge branch 'bugfix/idf_py_disable_cmake_warnings_default_v4.0' into 'release/v4.0'

idf.py: disable cmake uninitialized variable warnings by default (v4.0)

See merge request espressif/esp-idf!10203
This commit is contained in:
Angus Gratton
2021-01-19 14:21:50 +08:00
2 changed files with 7 additions and 4 deletions

View File

@@ -242,7 +242,7 @@ def _ensure_build_directory(args, always_run_cmake=False):
"-DPYTHON_DEPS_CHECKED=1",
"-DESP_PLATFORM=1",
]
if not args.no_warnings:
if args.cmake_warn_uninitialized:
cmake_args += ["--warn-uninitialized"]
cmake_args += ["-DWARN_UNINITIALIZED=1"]
@@ -998,8 +998,10 @@ def init_cli():
"default": None,
},
{
"names": ["-n", "--no-warnings"],
"help": "Disable Cmake warnings.",
"names": ["-w/-n", "--cmake-warn-uninitialized/--no-warnings"],
"help": ("Enable CMake uninitialized variable warnings for CMake files inside the project directory. "
"(--no-warnings is now the default, and doesn't need to be specified.)"),
"envvar": "IDF_CMAKE_WARN_UNINITIALIZED",
"is_flag": True,
"default": False,
},