I found a dirty fix to my problem:
buildDir> cmake -G "MinGW Makefiles" ..\MyProg\
buildDir> cmake -G "MinGW Makefiles" ..\MyProg\
The first time I get the error shown in my question. The second time everything goes as it should.
Let me know if you have a better, more logic solution.