GNU Global parser add CUDA
first
GNU Global support C/C++*1. and not support CUDA.
But CUDA is a programming language with C/C++ syntax.
I make ad-hoc patch with global 6.2.5.
this patch is cpp parser include .cu/.cuh extension of cpp(.cpp/.hpp/...etc).
global cuda support patch
diff --git a/configure.ac b/configure.ac index ed327de..bb27686 100644 --- a/configure.ac +++ b/configure.ac @@ -313,7 +313,7 @@ dnl DEFAULTSKIP: You need not list files whoes first character of name is '.'. dnl Such files are skipped even in case of not being in the list. dnl DEFAULTSKIP='HTML/,HTML.pub/,tags,TAGS,ID,y.tab.c,y.tab.h,cscope.out,cscope.po.out,cscope.in.out,SCCS/,RCS/,CVS/,CVSROOT/,{arch}/,autom4te.cache/' -DEFAULTLANGMAP='c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php:.php.php3.phtml' +DEFAULTLANGMAP='c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H.cu.cuh,php:.php.php3.phtml' DEFAULTINCLUDEFILESUFFIXES='h,hh,hxx,hpp,H,inc.php' AC_SUBST(DEFAULTSKIP) AC_SUBST(DEFAULTLANGMAP)
global rebuild
If you patched. and Build source code.
autoconf ./configure make
check gtags parse cuda code
I check it work.
git clone for test.
git clone https://github.com/programmine/CUDA.git
$ cd CUDA $ tree . |-- WaterSurface | |-- GPUFunctions.cu | |-- GPUFunctions.cuh ... | |-- wavemapCUDA.cpp | |-- wavemapCUDA.h | |-- wmatrix.cpp | `-- wmatrix.h `-- WaterSurface.sln 1 directory, 35 files
this project run gtags command.
$ gtags -v ... [7] extracting tags of WaterSurface/GPUFunctions.cu ... [17] extracting tags of WaterSurface/GPUFunctions.cuh ... [Tue Dec 18 01:17:39 JST 2012] Done.
OK, it works.
last
I push all source code to Github.
GitHub - murasesyuka/global at cpp_parser_include_cuda
GNU GLOBALハンドブック―ソースコードタグシステムposted with amazlet at 12.12.20山口 志義夫
多摩通信社
売り上げランキング: 79,892