https://github.com/Kitware/CMake
Raw File
Tip revision: 63a65baf4c343c73b2142078ef0045d3711dea1d authored by Brad King on 30 July 2020, 16:34:59 UTC
CMake 3.18.1
Tip revision: 63a65ba
test_opt.sh.in
#!/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"
back to top