CUDA: 3.23 fails to generate when `CMAKE_EXPORT_COMPILE_COMMANDS` is enabled with the Ninja generator
When trying to configure and generate a project that uses CUDA with the Ninja generator with 3.23 you get the following errors:
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
This occurs as the logic inside cmNinjaTargetGenerator::ExportObjectCompileCommand
wasn't updated during !6594 (merged) to account for the new variable logic.
Edited by Robert Maynard