File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FOLDER=build_unittests
2- set -e
1+ #! /usr/bin/env bash
2+ set -euo pipefail
33
4- mkdir -p $FOLDER
5- pushd $FOLDER
4+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
5+ ROOT_DIR=" $( cd " ${SCRIPT_DIR} /.." && pwd) "
6+ FOLDER=" ${SCRIPT_DIR} /build_unittests"
7+
8+ if [[ ! -f " ${ROOT_DIR} /tests/Catch2/CMakeLists.txt" ]]; then
9+ echo " Catch2 checkout missing; initializing tests/Catch2 submodule..."
10+ git -C " ${ROOT_DIR} " submodule update --init --recursive tests/Catch2
11+ fi
12+
13+ if [[ ! -f " ${ROOT_DIR} /tests/Catch2/CMakeLists.txt" ]]; then
14+ echo " Failed to initialize tests/Catch2/CMakeLists.txt."
15+ exit 1
16+ fi
17+
18+ mkdir -p " ${FOLDER} "
19+ pushd " ${FOLDER} " > /dev/null
620cmake ../unit -DCMAKE_BUILD_TYPE=Debug
7- make -j4
8- ctest --verbose . $@
9- popd
21+ cmake --build . -j4
22+ ctest --verbose " $@ "
23+ popd > /dev/null
You can’t perform that action at this time.
0 commit comments