~widelands-dev/widelands/terrain_affinity_as_int

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

#Requirements:
# scan-build/clang (obviously)
# gcc (used on non-Darwin platforms) 

if ! [ -d build ]; then
  echo "This script should be run from the root directory."
  exit 1
fi

SOURCE_DIR=`pwd`
BUILD_DIR=$SOURCE_DIR/build/scan-build

mkdir -p $BUILD_DIR
cd $BUILD_DIR

scan-build cmake $SOURCE_DIR -DCMAKE_BUILD_TYPE=Debug
scan-build make

#The output is stored in /tmp, doesn't need the actual build
cd $SOURCE_DIR
rm -r $BUILD_DIR