| 1 |
#!/bin/bash |
| 2 |
# Copyright (c) Microsoft. All rights reserved. |
| 3 |
# Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| 4 |
|
| 5 |
set -e |
| 6 |
|
| 7 |
build_root=$(cd "$(dirname "$0")/.." && pwd) |
| 8 |
cd $build_root |
| 9 |
|
| 10 |
build_folder=$build_root"/cmake" |
| 11 |
|
| 12 |
# Set the default cores |
| 13 |
CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) |
| 14 |
|
| 15 |
rm -r -f $build_folder |
| 16 |
mkdir -p $build_folder |
| 17 |
pushd $build_folder |
| 18 |
cmake $build_root -Drun_unittests:BOOL=ON -Duse_wolfssl:BOOL=ON -Duse_openssl:BOOL=OFF -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ |
| 19 |
make --jobs=$CORES |
| 20 |
|
| 21 |
popd |