sudo aptitude install clang
We assume ~/bin/ is in the PATH environment variable
cd ~/bin/
wget https://raw.githubusercontent.com/Rip-Rip/clang_complete/master/bin/cc_args.py
chmod +x cc_args.py
Enable c-c++ spacemacs layer with clang support:
(setq-default dotspacemacs-configuration-layers
'((c-c++ :variables c-c++-enable-clang-support t)))
export CHAMELEON_DIR=/path/to/chameleon-src/
spack install -v chameleon~simu@src ^mkl
module purge
spack load chameleon ; spack load cmake ; spack load fxt ; spack load openmpi ; spack load hwloc ; spack load starpu
cd $CHAMELEON_DIR
mkdir spack-cc_args-build
cd spack-cc_args-build
CC='cc_args.py gcc' cmake ..
make
We now gather, sort and unify the .clang_complete information we obtained from the build to the src directory:
find . | grep clang_complete | xargs cat | sort | uniq > ../clang_complete
M-m q r: restart both emacs and the server, prompting to save any changed buffers
M-m h d v: company-clang-arguments
https://www.youtube.com/watch?v=OjbkCEkboA8 (starting ~40’)
https://github.com/Rip-Rip/clang_complete
https://github.com/Rip-Rip/clang_complete/blob/master/bin/cc_args.py