Yes, only generators where CMake actually controls the command line itself support compilation databases (basically, non-IDE generators).
FD: CMake developer