Is there any way to create only symbol table using cmake for gdb ?
The usual way to produce debugging information for gdb is to pass -g to the gcc or g++ compiler (and also at linking time).
gdb
-g
gcc
g++
Look into the Cmake FAQ for how to get a debuggable executable.