-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake:bugfix generate config.h contain ; characters will be handled incorrectly #12237
Conversation
2b264d8
to
775b2f2
Compare
I have tested with lvgl v9 and it works! |
@xuxin930 nice description of a problem and its solution! Kudos!!! |
Is there any other way? This implementation seems complex and ugly,have you tried this config in zephyr build system? |
This issue not caused by @xuxin930 try this patch to check if there is any improvement.
|
775b2f2
to
2f319f2
Compare
…ncorrectly `;` is treated as a list separator in CMake. the file(STRING) function will read the wrong .config value string(REGEX REPLACE) will also incorrectly handle lines containing `;` so here we can only parse character by character. Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2f319f2
to
742c842
Compare
@anchao Yes! 👍 |
Summary
Issue
;
is treated as a list separator in CMake.when setting a configuration similar to the following,
an error will occur when generating config.h
Caution
This header file is completely wrong from line 237 onwards
Reason
This is because the file(STRING) function will read the wrong .config value line.
and string(REGEX REPLACE) will also incorrectly handle lines containing
;
.Solution
I changed the reading process to parse the entire .config as a big string.
parse each line character by character.
when there is a special character
;
, it is treated as a list and finally spliced.Impact
Testing
CI build