Commit 190ed78
committed
tools/cmake/common: quote DESCRIPTION in define_overridable_option
The set(..CACHE TYPE DOCSTRING [FORCE]) form treats the docstring as a
single argument, but `${DESCRIPTION}` was being expanded unquoted, so
multi-word descriptions were spilling their trailing words into
subsequent set() arguments. This is latent for the common case because
most existing STRING options are driven by the else-branch (not overridden
via -D), but any STRING option overridden on the cmake command line with
a multi-word description hits it — for example:
cmake -DEXECUTORCH_VULKAN_FP16_PRECISION=mediump ...
fails with the description text being fed to the downstream shader
generator as CLI args.
One-char fix: quote "${DESCRIPTION}" in both set() calls. Correct for
both single- and multi-word descriptions.1 parent 39426f6 commit 190ed78
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments