It is important to use $HOME/.vim/bin/cc_args.py , rather than ~/.vim/bin/cc_args.py , because ~ may not expand when quoting.
Also check for python script with
$ ls -l $HOME/.vim/bin/cc_args.py -rwxr-xr-x 1 myself staff 2270 Sep 19 16:11 /home/myself/.vim/bin/cc_args.py
if not found, adjust the python script path as needed.
Run make clean in the build directory.
As @xaizek suggested, start with an empty build directory (assuming the build directory is a subdirectory of the source directory):
CXX="$HOME/.vim/bin/cc_args.py g++" cmake ..
and then:
make
at this point, make will build the project, but calls cc_args.py (which will call g++ ) instead of directly calling g++ .
However, this part does not work for me, and the .clang_complete file is created in the assembly directory or elsewhere.
In fact, βcc_argsβ does not appear in the generated CMakeCache.txt / Makefile, so I suspect that CXX not a valid variable name for going to cmake.
When finished, copy .clang_complete to the parent directory.
source share