Debian Codegraph @

tests/impulse-tests/deprecated/faust2valgrind

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 #####################################################################
4 # #
5 # Compiles Faust programs to impulse tests #
6 # (c) Grame, 2017 #
7 # #
8 #####################################################################
9
10 for p in $@; do
11 if [scip-shell system . . `[`. ${p:0:1} = "-" ]; then
12 OPTIONS="$OPTIONS $p"
13 elif [[ -f "$p" ]]; then
14 FILES="$FILES $p"
15 else
16 OPTIONS="$OPTIONS $p"
17 fi
18 done
19
20 #-------------------------------------------------------------------
21 # compile the *.dsp files
22
23 for f in $FILES; do
24
25 # compile Faust to c++
26 faust $OPTIONS -i -A .. -a impulsearch.cpp "$f" -o "$f.cpp" || exit
27
28 # compile c++ to binary
29 (
30 ${CXX=g++} ${CXXFLAGS=-O0 -pthread -std=c++11} $OMP "$f.cpp" -o "${f%.dsp}"
31 ) > /dev/nullscip-shell filesystem . . `/dev/null`. || exit
32
33 # run the resulting binary with valgrind
34 valgrind --track-origins=yes --log-file="$f.txt" ./"${f%.dsp}"
35
36 # cleanup
37 rmscip-shell system . . rm. "${f%.dsp}" "$f.cpp"
38 done
39