-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Fix CLion 2021.3 support #4085
Fix CLion 2021.3 support #4085
Conversation
New CMake behavior crashes CLion with apostrophe symbols in `add_definitions` clause see https://youtrack.jetbrains.com/issue/CPP-26719
@@ -75,7 +75,7 @@ set(CMAKE_CXX_STANDARD {{ cxx_stds[-1] }}) | |||
|
|||
if (CMAKE_BUILD_TYPE MATCHES "{{ env_name }}") | |||
% for define in defines: | |||
add_definitions(-D'{{!re.sub(r"([\"\(\)#])", r"\\\1", define)}}') | |||
add_definitions(-D{{!re.sub(r"([\"\(\)#])", r"\\\1", define)}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use re.escape()
Ex:
add_definitions(-D{{!re.escape(define)}})
@pedrosousabarreto Does |
I can't test it right now, don't have python3.7 on this machine. A safer approach would be to simply add the space substitution: |
@ivankravets Tested and confirmed to work. |
@pedrosousabarreto , please make a PR to https://github.com/platformio/platformio-core |
@ivankravets Done, see #4105 |
New CMake behavior crashes CLion with apostrophe symbols in
add_definitions
clausesee https://youtrack.jetbrains.com/issue/CPP-26719