Thank you very much for your help.
It worked. In resume:

I changed the build directory to ‘C:\pytorch’  (no spaces in it)
I used ninja as the generator following:
Install with ninja 25


Just as reference this is my env info:
PyTorch version: 1.2.0a0+f2623c7
Is debug build: No
CUDA used to build PyTorch: 10.0

OS: Microsoft Windows 10 Home
GCC version: (tdm64-1) 5.1.0
CMake version: version 3.14.5

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.0.130
GPU models and configuration: GPU 0: GeForce GTX 1070
Nvidia driver version: 425.25
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\cudnn64_7.dll

Versions of relevant libraries:
[pip] numpy==1.12.1
[pip] numpydoc==0.6.0
[pip] torch==1.2.0a0+f2623c7
[conda] mkl                       2019.0                    <pip>
[conda] mkl                       2017.0.1                      0
[conda] mkl-include               2019.0                    <pip>
[conda] mkl-service               1.1.2                    py36_3
[conda] torch                     1.2.0a0+f2623c7           <pip>