Skip to content
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: Fix escaping of quotes in response file #15032

Merged
merged 1 commit into from
Sep 1, 2021

Commits on Sep 1, 2021

  1. CMake: Fix escaping of quotes in response file

    We put macros in a response file compile_time_defs.txt and pass it
    to the compiler. Adding a pair of single quotes around each -D flag
    ensures macro values are quoted correctly.
    
    For example,
    * String
      * target_compile_definitions(): either FOO="BAR" or FOO=\"BAR\"
      * response file: '-DFOO="BAR"'
      * actual definition: #define FOO "BAR"
    * Array of integers
      * target_compile_definitions(): FOO={1, 2, 3}
      * response file: '-DFOO={1, 2, 3}'
      * actual definition: #define FOO {1, 2, 3}
    LDong-Arm committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    d4ee3bd View commit details
    Browse the repository at this point in the history