Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[bug] Escape semicolon in CMake defines #15928

@stevenwdv

Description

@stevenwdv

Describe the bug

; should be escaped in CMake's add_compile_definitions where it is used in Conan. Compare:

add_compile_definitions("MYLIST=a;b;c")

generates -DMYLIST=a -Db -Dc!

add_compile_definitions("MYLIST=a\;b\;c")

generates -DMYLIST=a;b;c.

Relates to #15926, #14951.

How to reproduce it

E.g. use tools.build:defines=['MYLIST=a;b;c'], but this is not the only place in Conan where it is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions