CMake/Tests/FortranC/test_opt.sh.in
Brad King 555fcbd2e2 Test FortranCInterface flag propagation
We create test FortranC.Flags to try passing per-language flags from a
project into its FortranCInterface detect/verify checks.  We wrap the
compilers with scripts that enforce presence of expected flags.
2009-12-14 12:36:25 -05:00

19 lines
395 B
Bash
Executable File

#!/bin/sh
TEST_OPT_@ID@_FOUND=0
ARGS=""
for a in "$@"; do
if [ "x${TEST_OPT_@ID@}" != "x" -a "x${TEST_OPT_@ID@}" = "x$a" ]; then
TEST_OPT_@ID@_FOUND=1
else
ARGS="$ARGS \"$a\""
fi
done
if [ "x${TEST_OPT_@ID@}" != "x" -a "x${TEST_OPT_@ID@_FOUND}" != "x1" ]; then
echo "Not given option '${TEST_OPT_@ID@}' as expected!"
exit 1
fi
eval "\"@COMMAND@\"" "$ARGS"