NVHPC compiler + Ninja misses header dependencies
With CMake 3.20.1 and nvc++ 21.2 (NVHPC 21.2) then include dependencies are silently not added with the Ninja generator.
This appears to be because the CMake configuration for the NVHPC compiler does not have anything [like this](https://gitlab.kitware.com/cmake/cmake/-/blob/f0ecd9130131a72cef3f1d2fd6a9ac762db61aa2/Modules/Compiler/GNU.cmake#L51) to add the `-MD` option. This has been supported in NVHPC since [at least version 20.9](https://docs.nvidia.com/hpc-sdk/archive/20.9/compilers/hpc-compilers-ref-guide/index.html#md-uc).
A quick and dirty test adding
```cmake
set(CMAKE_DEPFILE_FLAGS_CXX "-MD<DEP_FILE>")
```
seems to improve the situation in a small test project.
Adding `-MT <DEP TARGET>`, which is documented in `nvc++ -help`, seems to modify the name of the target printed to the dependency file (as expected), but causes errors because it apparently stops the compiled object file being written. I am not sure what the downside, if any, of omitting the `-MT` option is.
If the Makefile generator is used then dependencies seem to be handled correctly.
I pushed a small demonstrator to https://gitlab.kitware.com/olupton/nvhpc-build-dependencies
issue