I am in need of the bracket escape character used to avoid quoting special characters in CMake when parsing make commands to add_custom_target. This is more of a syntax problem that from my understanding, is not covered in CMake documentation.
An example case is:
add_custom_target ( defined_path ALL .exe <args1> | ( ! grep ... )
In this example, the extension to <args1> is resolved as | "(" grep ... ")". Unfortunately appending backslash before the brackets only works for string cases, i.e. assigning to a variable with set: set ( something "\(" ). Even then the variable itself is resolved in the build.make surrounded by quotations. Likewise parsing a pre-formatted list using separate_arguments also resolves with quotations.
The full command without the make formatting is executed successfully.
Cmake requires an explicit call to shell in the target command
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With