diff options
author | Brad King <brad.king@kitware.com> | 2009-12-14 17:36:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-12-14 17:36:25 (GMT) |
commit | 555fcbd2e2e5cafbb7cbf55b88093cc8f73a8009 (patch) | |
tree | 2ab8a9c2032c7ce1a9c27b31570e02cfd8b69af2 /Tests/FortranC/test_opt.sh.in | |
parent | 126c93cddae95f46060f6d88af9c92dc6297f88d (diff) | |
download | CMake-555fcbd2e2e5cafbb7cbf55b88093cc8f73a8009.zip CMake-555fcbd2e2e5cafbb7cbf55b88093cc8f73a8009.tar.gz CMake-555fcbd2e2e5cafbb7cbf55b88093cc8f73a8009.tar.bz2 |
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.
Diffstat (limited to 'Tests/FortranC/test_opt.sh.in')
-rwxr-xr-x | Tests/FortranC/test_opt.sh.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/FortranC/test_opt.sh.in b/Tests/FortranC/test_opt.sh.in new file mode 100755 index 0000000..f3d93dc --- /dev/null +++ b/Tests/FortranC/test_opt.sh.in @@ -0,0 +1,18 @@ +#!/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" |