Skip to content

Commit

Permalink
master: Extend the test_one.sh utility so that it works with both mam…
Browse files Browse the repository at this point in the history
…e and ninja.
  • Loading branch information
bradbell committed Oct 5, 2024
1 parent f6e5a7e commit 76b01ba
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions bin/test_one.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,23 @@ fi
library_flags="$library_flags $cppad_lib_path -lpthread"
#
cd build
if ! ninja cppad_lib
if [ -e 'build.ninja' ] && [ -e 'Makefile' ]
then
echo 'test_one.sh: ninja cppad_lib failed: see erros above'
echo "bin/test_one.sh: Both build.ninja and Makefile are in $(pwd)"
exit 1
elif [ -e 'build.ninja' ]
then
builder=ninja
elif [ -e 'Makefile' ]
then
builder=make
else
echo "bin/test_one.sh: Neither build.ninja or Makefile is in $(pwd)"
exit 1
fi
if ! $builder cppad_lib
then
echo "test_one.sh: $builder cppad_lib failed: see erros above"
exit 1
fi
cd ..
Expand Down

0 comments on commit 76b01ba

Please sign in to comment.