Skip to content

Instantly share code, notes, and snippets.

@rofirrim
Created October 1, 2017 15:43
Show Gist options
  • Save rofirrim/db25fa80153597c48e6a81fd2323dc43 to your computer and use it in GitHub Desktop.
Save rofirrim/db25fa80153597c48e6a81fd2323dc43 to your computer and use it in GitHub Desktop.
#!/bin/bash
TOOL="$1"
MY_PATH=$(dirname $(realpath $0))
IWYUC_FLAGS="\
-Xiwyu --no_comments \
-isystem /home/roger/soft/llvm-4.0/install/bin/../lib/clang/4.0.0/include/ \
-isystem /usr/lib/gcc/x86_64-linux-gnu/6/include"
if [ "$TOOL" = "g++" ];
then
IWYUC_FLAGS+=" -std=c++11"
fi
shift
/home/roger/soft/include-what-you-use/build/include-what-you-use ${IWYUC_FLAGS} $@ &>> ${MY_PATH}/log-iwyu.txt
exec "${TOOL}" $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment