Improve CMake detection on Windows when not in PATH (#16328)
authorJan Kotas <jkotas@microsoft.com>
Mon, 12 Feb 2018 07:00:55 +0000 (23:00 -0800)
committerGitHub <noreply@github.com>
Mon, 12 Feb 2018 07:00:55 +0000 (23:00 -0800)
commit66f840939e81a6e240a01edfea61976363bc51d6
tree024528c1e08d45ba39b6e32b76cf98ec2cb033fb
parentce060415550334e598ee2efbc4beed0f07ede3f9
Improve CMake detection on Windows when not in PATH (#16328)

Port dotnet/corert#5372

curl https://github.com/dotnet/corert/commit/b723f90c611a2c79a0921f95c7299ebb7325eb59.patch | git am -p 3 --directory='src/pal/tools/' --reject

In CMake v10.2, the key `hklm:\SOFTWARE\Kitware` returns:

```powershell
    Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Kitware

Name                           Property
----                           --------
CMake                          InstallDir : C:\Program Files\CMake\
```

with no space after `CMake` and property name `InstallDir`,
instead of `'(default)'`.
src/pal/tools/probe-win.ps1