diff options
Diffstat (limited to 'pkg-test/test-cmake')
-rwxr-xr-x | pkg-test/test-cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg-test/test-cmake b/pkg-test/test-cmake index 4fd5846b..ab986f8e 100755 --- a/pkg-test/test-cmake +++ b/pkg-test/test-cmake @@ -11,8 +11,14 @@ if [ ! -d "$TMP" ]; then echo 1>&2 "Usage: $0 tmp-dir" exit 2 fi + +WANTED_VERSION=$(awk -F'"' '/#define QPDF_VERSION / {print $2}' include/qpdf/DLL.h) + cp pkg-test/qpdf-version.cc pkg-test/CMakeLists.txt $TMP cd $TMP cmake -S . -B build cmake --build build -./build/qpdf-version +if [ "$(./build/qpdf-version)" != "$WANTED_VERSION" ]; then + echo 1>&2 "Failed to get correct qpdf version from cmake test" + exit 2 +fi |