CMake Regex to convert lower case to upper case
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 replace开发者_如何学编程d 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)
精彩评论