File indexing completed on 2024-10-06 12:12:53
0001 #!/bin/bash 0002 0003 BUILDDIR=build-clazy 0004 0005 if [ ! -d $BUILDDIR ]; then 0006 mkdir -p $BUILDDIR 0007 fi 0008 0009 cd $BUILDDIR 0010 0011 export CC=clang 0012 export CXX=clang++ 0013 0014 0015 #https://github.com/KDE/clazy 0016 # There are many checks and they are divided in levels: 0017 # 0018 # level0: Very stable checks, 99.99% safe, no false-positives 0019 # level1: Similar to level0, but sometimes (rarely) there might be some false-positives 0020 # level2: Sometimes has false-positives (20-30%). 0021 # level3: Not always correct, possibly very noisy, might require a knowledgeable developer to review, might have a very big rate of false-positives, might have bugs. 0022 0023 export CLAZY_CHECKS="level2,no-qenums,no-qt-macros" 0024 0025 cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Xclang -load -Xclang ClazyPlugin.so -Xclang -add-plugin -Xclang clazy -D_GNU_SOURCE -O2 -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code -fno-omit-frame-pointer -fstack-protector -fno-exceptions" -DCMAKE_CXX_FLAGS="-D_GNU_SOURCE -std=c++11 -O2 -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code -fno-omit-frame-pointer -fstack-protector -fno-exceptions" -DCMAKE_INSTALL_PREFIX=/usr && make -j 4