mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
idf.py: Disable CMake --warn-uninitialized option by default
Can still be enabled by passing --cmake-warn-uninitialized on the command line Prevents CMake warnings printed by default if IDF_PATH is underneath the CMake project directory. The reason for this is that CMake --warn-uninitialized only enables checks inside the project directory (ie top-level CMakeLists.txt directory and subdirectories), it doesn't enable for files included from other directories. (The only way to enable warnings in other directories is to pass --check-system-dirs and this looks like it's only useful for CMake's own developers as it prints a lot of warnings from inside CMake otherwise - see https://gitlab.kitware.com/cmake/cmake/-/issues/19645 ) Plan to follow up with a later commit to clean up most of the warnings (which aren't problems for CMake execution), but we'll also disable this option by default to avoid this unexpected triggering of IDF warnings.
This commit is contained in:

committed by
Angus Gratton

parent
bc5c508211
commit
ad295037a8
@@ -221,8 +221,10 @@ def action_extensions(base_actions, project_path):
|
||||
"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,
|
||||
},
|
||||
|
Reference in New Issue
Block a user