CMake is complaining about the "^" regex if the prefixes are empty strings. (cherry picked from commit e441a584)