]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
meson: Error out if fail to extracted version number 1602/head
authorLzu Tao <taolzu@gmail.com>
Tue, 30 Apr 2019 06:12:00 +0000 (13:12 +0700)
committerLzu Tao <taolzu@gmail.com>
Tue, 30 Apr 2019 06:12:00 +0000 (13:12 +0700)
.travis.yml
build/meson/meson.build

index 1cb9851e94c2676d7525091ab4582f592716b74e..d4450ce57c87e48338cc3c54ea4451407921d897 100644 (file)
@@ -190,13 +190,13 @@ matrix:
             && python3 ~/get-pip.py --user
             && pip3 install --user meson
       script:
-        - meson --buildtype=debug
+        - meson setup --buildtype=debug
                 -Db_lundef=false
                 -Dauto_features=enabled
                 -Dbuild_{programs,tests,contrib}=true
                 -Ddefault_library=both
                 build/meson builddir
-        - cd builddir
+        - pushd builddir
         - DESTDIR=./staging ninja install
         - tree ./staging
   allow_failures:
index 59815f03c3c7786143ce37509dff991aded680ea..190514f5bd82ad100ab4b5f339b5d60a24578c94 100644 (file)
@@ -16,9 +16,7 @@ project('zstd',
     'cpp_std=c++11',
     'buildtype=release'
   ],
-  # Fall-back version in case of extracting version number from
-  # `zstd.h` failed.
-  version: '1.4.0',
+  version: 'DUMMY',
   meson_version: '>=0.47.0')
 
 cc = meson.get_compiler('c')
@@ -45,13 +43,10 @@ zstd_h_file = join_paths(meson.current_source_dir(), '../../lib/zstd.h')
 GetZstdLibraryVersion_py = files('GetZstdLibraryVersion.py')
 r = run_command(python3, GetZstdLibraryVersion_py, zstd_h_file)
 if r.returncode() == 0
-  output = r.stdout().strip()
-  if output.version_compare('>@0@'.format(zstd_version))
-    zstd_version = output
-    message('Project version is now: @0@'.format(zstd_version))
-  endif
+  zstd_version = r.stdout().strip()
+  message('Project version is now: @0@'.format(zstd_version))
 else
-  message('Cannot find project version in @0@'.format(zstd_h_file))
+  error('Cannot find project version in @0@'.format(zstd_h_file))
 endif
 
 zstd_libversion = zstd_version