diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2023-07-16 02:03:33 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2023-07-16 02:03:33 +0200 |
commit | 5a40295c4cf0af5ea8da9ced04a4ce7d3621a080 (patch) | |
tree | cb21506e7b04d10b45d6066a0ee1655563d5d52b /test/cgen_test/cgen_test.sh |
Squashed 'flatcc/' content from commit 473da2a
git-subtree-dir: flatcc
git-subtree-split: 473da2afa5ca435363f8c5e6569167aee6bc31c5
Diffstat (limited to 'test/cgen_test/cgen_test.sh')
-rwxr-xr-x | test/cgen_test/cgen_test.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/cgen_test/cgen_test.sh b/test/cgen_test/cgen_test.sh new file mode 100755 index 0000000..0280e9d --- /dev/null +++ b/test/cgen_test/cgen_test.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -e +cd `dirname $0`/../.. +ROOT=`pwd` + +CC=${CC:-cc} +TMP=${ROOT}/build/tmp/test/cgen_test +INC=${ROOT}/include + +${ROOT}/scripts/build.sh + +mkdir -p ${TMP} +rm -rf ${TMP}/* + +echo "generating test source for Debug" 1>&2 +${ROOT}/build/Debug/test/cgen_test/cgen_test_d > ${TMP}/test_generated_d.c +cd ${TMP} && $CC test_generated_d.c -c -I${INC} + +echo "generating test source for Release" 1>&2 +${ROOT}/build/Release/test/cgen_test/cgen_test > ${TMP}/test_generated.c +cd ${TMP} && $CC test_generated.c -c -Wall -O3 -I${INC} |