Wykres commitów

2 Commity (master)

Autor SHA1 Wiadomość Data
Ivan Grokhotkov cf8fb9e950
tools: fixup version references related to paths with spaces
The feature will only appear in 5.0 release, not in 4.4.
2022-05-02 19:05:47 +02:00
Ivan Grokhotkov 09e50b27ed cmake: handling of space-separated EXTRA_COMPONENT_DIRS
COMPONENT_DIRS and EXTRA_COMPONENT_DIRS should be defined as CMake
lists, using 'set' or 'list' commands. Some applications written
for earlier versions of ESP-IDF used to define these variables as
space separated strings.

For example, the following is correct:

  set(EXTRA_COMPONENT_DIRS path/to/components path/to/more/components)

The following is not correct:

  set(EXTRA_COMPONENT_DIRS "${EXTRA_COMPONENT_DIRS} component1")
  set(EXTRA_COMPONENT_DIRS "${EXTRA_COMPONENT_DIRS} component2")

The string "component1 component2" may indicate a single directory
name with a space, or two directory names separated by space.

However due to the fact that such way of defining EXTRA_COMPONENT_DIRS
was supported in IDF 4.3 and earlier, we need to provide backward
compatibility for it.

This commit introduces a new script, split_paths_by_spaces.py, which
is invoked if EXTRA_COMPONENT_DIRS or COMPONENT_DIRS variable contains
spaces. The script tries to determine if each space should be
interpreted as a separator or as part of the directory name.

When this cannot be done unambiguously, the script reports an error.

In all cases when space separators are detected, the script reports
a warning, and prints instructions for fixing the CMakeLists.txt.

Breaking change in this commit: specifying non-existent directories
in COMPONENT_DIRS or EXTRA_COMPONENT_DIRS is no longer allowed.
2021-12-14 19:17:53 +01:00