Weird cscope issue on Mac

I use emacs and xcsope and I’ve faced this weird issue of “no source files found” when trying to use xcsope on a new source code directory.

Somehow cscope doesn’t find the source files if the source files are within subdirectories and the cscope-initial-directory variable is set to the parent directory where there are no source files.

According to the documentation, the variable cscope-index-recursively should be set to non-nil. But it didn’t solve the problem.

On both the occasions I ended up listing and indexing manually using the command “C-c s I” and it started working afterwards.