-
Notifications
You must be signed in to change notification settings - Fork 10
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
unspecified parsing error for escaped quotes #49
Comments
This will be rather difficult to fix because I never implemented proper parsing of so called "unquoted legacy" part of unquoted strings because I thought it won't manifest in practice. I was right for about 5 years now. :) CMake documentation recommends the approach you present in workaround:
I'll try my best but it might be that rare case where I acknowledge the bug without further action. As a side note I've run set(INSTALL_PREFIX "install prefix")
set(MY_VAR1
-DCMAKE_INSTALL_PREFIX="\"${INSTALL_PREFIX}\""
)
set(MY_VAR2
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
)
set(MY_VAR3
"-DCMAKE_INSTALL_PREFIX=\"${INSTALL_PREFIX}\""
)
message(STATUS "My var 1: ${MY_VAR1}")
message(STATUS "My var 2: ${MY_VAR2}")
message(STATUS "My var 3: ${MY_VAR3}") and it looks like the problematic code (
|
I have no issue closing this as my case ended up not needing the additional quotes. Thank you for taking the time to look into the issue! |
I'll weigh it myself whether it's worth fixing that since a lot could change across these 5 years and it might be not as difficult as I anticipate now. Thanks for the report. |
Hello,
Using the latest gersemi release 0.17.1 installed via pip I get an
unspecified parsing error
on cmake source files with escaped quotes in a very specific configuration. A minimum reproduction can be made placing the following in a CMakeLists.txt file and running the formatter/checker on it:I can work around this for my specific case by moving the "middle" quote to the beginning of the line like so:
The text was updated successfully, but these errors were encountered: