cmake: distinguish '-Cpath' from '-C path' in source dir parsing
This results in the correct source directory being picked up in calls with
cmake sourcedir -C settings
and in a more appropriate error message when calling
mkdir build ; cd build ; cmake -C settings
(cmake will then complain about the current working directory not containing a CMakeLists.txt file rather than settings
being a file and not a directory)
Also fix -D
and -U
in the same way.
Edited by Brad King