diff options
author | Brad King <brad.king@kitware.com> | 2017-03-01 14:00:46 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-03-01 14:00:46 (GMT) |
commit | f782b31368059ce17aee9758de5709ffa43841bf (patch) | |
tree | caa4cf0450c4269b8785bcaed13e890834439d20 /Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh | |
parent | 86563cf7c8e6dd4fa98a35b9153e4108e8a2286f (diff) | |
parent | 8d71fa92838f9fd3d444963c6ea6ea0d7be39cf3 (diff) | |
download | CMake-f782b31368059ce17aee9758de5709ffa43841bf.zip CMake-f782b31368059ce17aee9758de5709ffa43841bf.tar.gz CMake-f782b31368059ce17aee9758de5709ffa43841bf.tar.bz2 |
Merge topic 'FindPkgConfig-version-ops'
8d71fa92 FindPkgConfig: use new version checking "library >= version" syntax
Diffstat (limited to 'Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh')
-rwxr-xr-x | Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh index abe14bf..56bba30 100755 --- a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh +++ b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh @@ -4,18 +4,20 @@ # to the --exists argument with the PKG_CONFIG_PATH environment variable # and returns 1 if they are different. -case $1 in - --version) - echo "0.0-cmake-dummy" - ;; - --exists) - shift - eval last=\${$#} - echo "Expected: ${last}" - echo "Found: ${PKG_CONFIG_PATH}" - [ "${last}" = "${PKG_CONFIG_PATH}" ] || exit 1 - ;; - *) - exit 255 - ;; -esac +while [ $# -gt 0 ]; do + case $1 in + --version) + echo "0.0-cmake-dummy" + exit 0 + ;; + --exists) + shift + eval last=\${$#} + echo "Expected: ${last}" + echo "Found: ${PKG_CONFIG_PATH}" + [ "${last}" = "${PKG_CONFIG_PATH}" ] && exit 0 || exit 1 + ;; + esac + shift +done +exit 255 |