I ran into problems some time ago since most Linux distributions chose to make /bin a symlink to /usr/bin (and sbin and lib respectively), and you have defined both /bin and /usr/bin in your PATH variable. cmake then generates double definitions, which you can recognize by having a double slash // in the path name.
You can fix your build.ninja file with some simple sed scripting, and you should fix your PATH definition.