mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 20:24:35 +03:00
example for using clang and ninja
This commit is contained in:
19
test.sh
19
test.sh
@@ -8,6 +8,8 @@ dirs=( ./01-basic/A-hello-cmake \
|
||||
./01-basic/F-build-type \
|
||||
./01-basic/G-compile-flags \
|
||||
./01-basic/H-third-party-library \
|
||||
./01-basic/I-compiling-with-clang \
|
||||
./01-basic/J-building-with-ninja \
|
||||
./02-sub-projects/A-basic \
|
||||
./03-code-generation/protobuf \
|
||||
./03-code-generation/configure-files \
|
||||
@@ -38,10 +40,19 @@ do
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $dir && mkdir -p build && cd build && cmake .. && make
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error running example $dir"
|
||||
exit 1
|
||||
if [ -f "$dir/run_test.sh" ]; then
|
||||
echo "running run_test"
|
||||
$ROOT_DIR/$dir/run_test.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error running run_test for $dir"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
cd $dir && mkdir -p build && cd build && cmake .. && make
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error running example $dir"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$ROOT_DIR/$dir/post_test.sh" ]; then
|
||||
|
||||
Reference in New Issue
Block a user