To filter out all of the unrelated files, we can generate cscope.files using find as follows
find ./src ./include -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) -print > cscope.filesThis will search for all .cpp, .h, and .c files in the src/ directory and dump them into a cscope.files files.
Next to gerenate the cscope database and referesh it, use
cscope -C -b -q -k