Hi i'm trying to convert a string of lowercase letters to uppercase using regex in a cmake file.
The command i'm using is:
string(REGEX REPLACE match replace output input)
Does anyone know how to specify that each lower case letter be replaced with its uppercase counterpart using cmake's regex facility?
I don't think it is possible to do that with a CMake regular expression. If you just want to convert a string to uppercase you can use the TOUPPER string function:
string(TOUPPER <string1> <output variable>)
Example to convert the contents of a variable to uppercase:
string(TOUPPER ${VARNAME} VARNAME)
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