Cmake on windows

Note that the branch that I pushed to Jenkins is slightly different.  I rebased it on your version of master and resolved some conflicts.