forked from KDE/labplot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile-clazy
executable file
·25 lines (17 loc) · 1.11 KB
/
compile-clazy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
BUILDDIR=build-clazy
if [ ! -d $BUILDDIR ]; then
mkdir -p $BUILDDIR
fi
cd $BUILDDIR
export CC=clang
export CXX=clang++
#https://github.com/KDE/clazy
# There are many checks and they are divided in levels:
#
# level0: Very stable checks, 99.99% safe, no false-positives
# level1: Similar to level0, but sometimes (rarely) there might be some false-positives
# level2: Sometimes has false-positives (20-30%).
# 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.
export CLAZY_CHECKS="level2,no-qenums,no-qt-macros"
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy -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