It is important to use $HOME/.vim/bin/cc_args.py
and not ~/.vim/bin/cc_args.py
, because ~
might not get expanded when quoted.
Also, verify the presence of the 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 necessary.
Run make clean
in the build dir.
As suggested by @xaizek, start with an empty build directory (assuming the build directory is a subdir of the source dir):
CXX="$HOME/.vim/bin/cc_args.py g++" cmake ..
followed by:
make
at this point, make will be building the project, but calling cc_args.py
(which will call g++
), instead of directly calling g++
.
However this part for me is failing to work, and no .clang_complete
file is created in the build directory or anywhere else.
In fact, there is no occurrence of "cc_args" in the generated CMakeCache.txt / Makefile, so I suspect CXX
is not the correct variable name to pass to cmake.
When finished, copy .clang_complete
to the parent dir.