aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/eclipse-cmake-prepare.sh
blob: 0298a869bceddd182b7ed1eb63a1f52375a643d9 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh

sdir=`dirname $(readlink -f $0)`
rootdir=`dirname $sdir`
bname=`basename $0 .sh`

. $sdir/setup-machine-arch.sh

debug_dist_dir="Debug-dist"
debug_build_dir="Debug"
echo debug_dist_dir $debug_dist_dir
echo debug_build_dir $debug_build_dir

release_dist_dir="Release-dist"
release_build_dir="Release"
echo release_dist_dir $release_dist_dir
echo release_build_dir $release_build_dir

cd $rootdir
rm -rf $debug_dist_dir
mkdir -p $debug_dist_dir
rm -rf $debug_build_dir
mkdir -p $debug_build_dir
cd $debug_build_dir
# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy;-p;$rootdir/$debug_build_dir"

cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$debug_dist_dir -DBUILDJAVA=ON -DBUILD_TESTING=ON -DUSE_LIBUNWIND=ON -DUSE_LIBCURL=ON -DTEST_WITH_SUDO=ON -DDEBUG=ON ..

cd $rootdir
rm -rf $release_dist_dir
mkdir -p $release_dist_dir
rm -rf $release_build_dir
mkdir -p $release_build_dir
cd $release_build_dir
# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy;-p;$rootdir/$release_build_dir"

cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$release_dist_dir -DBUILDJAVA=ON -DBUILD_TESTING=ON -DUSE_LIBUNWIND=ON -DUSE_LIBCURL=ON -DTEST_WITH_SUDO=ON ..

cd $rootdir