Merge lp:~hjd/widelands/scan-build-cmake into lp:widelands

Proposed by Hans Joachim Desserud
Status: Merged
Merged at revision: 6631
Proposed branch: lp:~hjd/widelands/scan-build-cmake
Merge into: lp:widelands
Diff against target: 32 lines (+1/-15)
1 file modified
utils/scan-build.sh (+1/-15)
To merge this branch: bzr merge lp:~hjd/widelands/scan-build-cmake
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+175269@code.launchpad.net

Description of the change

Yesterday I learnt that it is sufficient to run `scan-build cmake` to have it replace the compiler in the necessary places. Thus there is no need to find and add the script manually. This should also expand cross-platform support quite a bit.

PS.
SirVer: I think this might work on OS X too now, if you want to test it. :)

To post a comment you must log in.
Revision history for this message
SirVer (sirver) wrote :

Thanks! Merged.

I didn't try running scan-build. There are currently so much stuff going on with Widelands that I am not generating extra work for myself if I can avoid it :).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utils/scan-build.sh'
2--- utils/scan-build.sh 2013-07-14 10:34:35 +0000
3+++ utils/scan-build.sh 2013-07-17 12:38:26 +0000
4@@ -14,27 +14,13 @@
5 exit 1
6 fi
7
8-if [ -e /usr/share/clang/scan-build/c++-analyzer ]; then
9- #Debian-based
10- ANALYZER=/usr/share/clang/scan-build/c++-analyzer
11-elif [ -e /usr/lib/clang-analyzer/scan-build/c++-analyzer ]; then
12- #Arch
13- ANALYZER=/usr/lib/clang-analyzer/scan-build/c++-analyzer
14-else
15- echo "Could not find c++-analyzer on your platform."
16- echo "We are currenly only able to locate it on Arch and Debian-based platforms."
17- echo "If you know where we could find it, please let us know."
18- exit 1
19-fi
20-
21 SOURCE_DIR=`pwd`
22 BUILD_DIR=$SOURCE_DIR/build/scan-build
23
24 mkdir -p $BUILD_DIR
25 cd $BUILD_DIR
26
27-cmake $SOURCE_DIR -DCMAKE_CXX_COMPILER=$ANALYZER \
28- -DCMAKE_BUILD_TYPE=Debug \
29+scan-build cmake $SOURCE_DIR -DCMAKE_BUILD_TYPE=Debug \
30 -DWL_PORTABLE=true
31
32 scan-build make

Subscribers

People subscribed via source and target branches

to status/vote changes: