the regex used to detect the gcc major version in cmake/Modules/cvmfs_compiler.cmake fails for versions with more than one digit (i.e. gcc 10).
I think the problem is that in:
the initial .* is greedy and will consume all digits but the last one. Replacing with .*? should do the job: