Just a quick update. The error on my side was also related to the cc version on my machine. It seems that CMake looks at cc when creating the Makefile not gcc. While my gcc was version 9.x my cc was 4.x which lead to the compiler version error.
This could be solved by adding an environment variable for cc (if newer versions already exist):

  
      stackoverflow.com
  
  
      
    
  

  How to specify new GCC path for CMake 1



  gcc, cmake



  asked by
  
  
    tidy
  
  on 12:21PM - 24 Jun 13 UTC