CMake fails with CMAKE_EXPORT_COMPILE_COMMANDS, CUDA and Ninja
I tried to enable CMAKE_EXPORT_COMPILE_COMMANDS in a project using CUDA.
We use the native CUDA support. When using the Make generators everything is file and I can compile and everything works as expected. With the Ninja generators I get:
-- Configuring done CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_CUDA_COMPILE_OBJECT CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_CUDA_COMPILE_OBJECT CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is:
Steps to reproduce:
- Clone QUDA from https://github.com/lattice/quda.git
- Checkout branch hotfix/improve_eigen_download
- make a build dir and run
- cmake -GNinja
cmake works fine (Makefile generator)
I tried cmake 3.8.x as well as 3.9.0-rc6.