Vladimir:
I can't tell from your log what exactly the compiler error is that leads
cmake to declare that it can't compile a simple test program. In
essence, what we do is collect the flags that we want to pass to the
compiler (to switch on warnings, enable optimizations, link with
external libraries) and then we see whether we can compile a small
program with it. That steps seems to be failing for you, which means
that either the compiler did not understand one of the flags or perhaps
could not find one of the external libraries. I don't know what the
specific reason is why it fails, but if you search through the files
that are probably in a directory called CMakeFiles then I think you
should be able to identify the specific error the compiler gives you and
that would be helpful to know what it is that is going wrong.
So, can you see whether you can find out something more in this direction?
Best
W.