2 # replace any non-alnum characters with underscore and uppercase the result
3 function(safe_string STRING OUTPUT)
4 string(REGEX REPLACE "[^0-9a-zA-Z_]" "_" HEADER_SAFE ${STRING})
5 string(TOUPPER "${HEADER_SAFE}" HEADER_DEFN)
6 set(${OUTPUT} ${HEADER_DEFN} PARENT_SCOPE)
7 endfunction(safe_string)