TL;DR;
I am trying to build OpenCV for MinGW. cmake keeps complaining about no sane CXX compiler, although I can compile sample code with g++.exe.
cmake
I tried everthing mentioned here and CMAKE_MAKE_PROGRAM not found but nothing helped. Then restarted the computer and it works.