forked from ClickHouse/clickhouse-odbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease_macos.sh
executable file
·30 lines (28 loc) · 1.1 KB
/
release_macos.sh
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
#!/usr/bin/env sh
brew install gcc ninja libiodbc
brew unlink unixodbc
brew link libiodbc
#brew install unixodbc;brew unlink libiodbc;brew link unixodbc
#for compiler in _gcc; do
for compiler in ""; do
for type in relwithdebinfo; do
for option in ""; do
CMAKE_FLAGS_ADD=""
if [ "$compiler" = "_gcc" ]; then
CMAKE_FLAGS_ADD="${CMAKE_FLAGS_ADD} -DCMAKE_CXX_COMPILER=`which g++-8 g++-7 g++8 g++7 g++ | head -n1` -DCMAKE_C_COMPILER=`which gcc-7 gcc-8 gcc8 gcc7 gcc | head -n1`"
fi
build_dir=build${compiler}_$type$option
echo build $compiler $type $option in ${build_dir}
mkdir -p ${build_dir}
cd ${build_dir}
rm CMakeCache.txt
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$type -DTEST_DSN=${TEST_DSN=clickhouse_localhost} -DTEST_DSN_W=${TEST_DSN=clickhouse_localhost_w} $CMAKE_FLAGS_ADD $CMAKE_FLAGS && cmake --build . -- -j ${MAKEJ=$(distcc -j || nproc || sysctl -n hw.ncpu || echo 4)}
cd ..
rm -rf build
ln -sf ${build_dir} build
cd ${build_dir}
ctest -V
cd ..
done
done
done