268 Commits

Author SHA1 Message Date
Yann Collet
ee65162655 Merge branch 'dev' into fasterCygwin 2021-05-06 16:06:00 -07:00
sen
698f261b35
[1.5.0] Deprecate some functions (#2582)
* Add deprecated macro to zstd.h, mark certain functions as deprecated

* Remove ZSTD_compress.c dependencies on deprecated functions
2021-05-06 17:59:32 -04:00
Nick Terrell
e7e4b74b2b
Merge pull request #2600 from nickhutchinson/clang-cl
Fix for excessive compiler warnings when building with clang-cl
2021-05-06 12:43:15 -07:00
Nick Hutchinson
2d34062836 CMake: fix excessive build warnings when building with clang-cl 2021-05-06 18:46:37 +01:00
Yann Collet
2e76bd7d10 attempt to make Appveyor's Cygwin test faster
Cygwin is the longest Appveyor test
Appveyor is typically the CI which finish last
2021-05-06 08:47:45 -07:00
W. Felix Handte
4ba49af665 Rewrite References to Location 2021-05-05 18:03:48 -04:00
W. Felix Handte
1d65917323 Move Single-File Build Script from contrib/ to build/ 2021-05-05 16:07:51 -04:00
Nick Terrell
09149beaf8 [1.5.0] Move zstd_errors.h and zdict.h to lib/ root
`zstd_errors.h` and `zdict.h` are public headers, so they deserve to be
in the root `lib/` directory with `zstd.h`, not mixed in with our private
headers.
2021-04-30 15:13:54 -07:00
Nick Terrell
6cee3c2c4f [trace] Remove default definitions of weak symbols
Instead of providing a default no-op implementation, check the symbols
for `NULL` before accessing them. Providing a default implementation
doesn't reliably work with dynamic linking. Depending on link order the
default implementations may not be overridden. By skipping the default
implementation, all link order issues are resolved. If the symbols
aren't provided the weak function will be `NULL`.
2021-04-26 16:05:39 -07:00
senhuang42
a423305e7b Remove ZBUFF tests 2021-04-19 17:27:05 -04:00
SupervisedThinking
edf2b1176d meson: fix build by adding missing files
fixes https://github.com/facebook/zstd/issues/2519
2021-03-19 19:52:45 +01:00
Issam E. Maghni
2636f53619 CMake: Enable only C for lib and programs projects 2021-02-07 19:39:04 -05:00
Nick Terrell
54a4998a80 Add basic tracing functionality 2021-02-05 16:28:52 -08:00
Christoph Reiter
0766540b59 cmake: use configure_file() for creating the .pc file
Escaping in add_custom_target() seems to depend on the shell used in the cmake
generator and using Ninja on Windows, which uses cmd.exe, results in stray backslashes
in the .pc file.

Instead of going through escaping hell just use configure_file() with the existing
libzstd.pc.in file already used by the simple Makefile based build system.

This fixes the .pc file syntax when building zstd with CMake+Ninja+gcc on Windows.
2021-01-09 09:29:16 +01:00
Nick Terrell
bc3cda9b9f [CI][cmake] Disable --test-large-data and shorten fuzzing time to 2 mins 2020-12-10 13:33:34 -08:00
Nick Terrell
54105f5757 [cmake] Quote environment variables for tests
Fix the quoting for the invocation of `playtests.sh`.
2020-12-10 11:03:47 -08:00
Nick Terrell
ef5d15b719 [cmake] Fix pkgconfig quoting
The pkgconfig file generation didn't correctly escape the paths. It both
quoted and escaped spaces with `\`, which doesn't work. The fix is to
remove the quoting.
2020-12-10 11:03:45 -08:00
W. Felix Handte
a75f9ce3e9 Apply Same Strategy to CMake 2020-12-08 20:46:37 -05:00
senhuang42
db249bef4b Allow paramgrill in cmake on windows 2020-12-03 10:39:16 -05:00
Stephen Brawner
19e773a5d6 Update cmake_minimum_required to 2.8.12
Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-11-24 12:05:42 -08:00
Yann Collet
40f20b6453
Merge pull request #2197 from neheb/hj
meson: remove build requirement for distutils
2020-07-17 09:16:11 -07:00
Yann Collet
865ecf67ae
Merge pull request #2183 from tonytheodore/patch-1
Install pkg-config file on MINGW also
2020-07-10 01:20:59 -07:00
Bimba Shrestha
0fa9406ae2 removing deduplicatin of flags 2020-06-15 14:58:53 -07:00
Rosen Penev
447629b61b
meson: remove build requirement for distutils
Tested on a default installation of Debian 10.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-09 16:33:16 -07:00
Bimba Shrestha
e75db971fc DLL install fix for https://github.com/facebook/zstd/issues/2160
Credit goes to @xantares

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
2020-06-02 07:45:06 -07:00
Tony Theodore
53fe73a720
Install pkg-config file on MINGW also
Mingw follows unix conventions and often expects pkg-config files to be present.
2020-06-02 18:18:40 +10:00
Yann Collet
082755bd3f do not install zbuff.h
this API is deprecated, for a loong time now,
all related symbols will be removed in a future version (likely v1.5.0)
and the header file `zbuff.h` doesn't compile from `include/` anyway,
because it needs to be positioned one directory below `zstd.h`.

Also removed `cover.h` from `cmake` installer,
as it should have never been part of this list to begin with.
2020-05-22 15:35:54 -07:00
Yann Collet
26b21e481f fix meson playTests.sh 2020-05-21 15:17:22 -07:00
Yann Collet
14aaa5290a fixed zbuff test
error introduced in 3b39ce6b52/.travis.yml (L192)
2020-05-21 00:22:52 -07:00
W. Felix Handte
15561bcf74 Fix pkg-config File Generation Again Again
Resubmission of #2001. This switches the `sed` invocations to use `-E`,
extended regex syntax, which is better standardized across platforms.
I guess.

Same test plan:

```
make -C lib clean libzstd.pc
cat lib/libzstd.pc

echo # should fail
make -C lib clean libzstd.pc     LIBDIR=/foo
make -C lib clean libzstd.pc INCLUDEDIR=/foo
make -C lib clean libzstd.pc     LIBDIR=/usr/localfoo
make -C lib clean libzstd.pc INCLUDEDIR=/usr/localfoo
make -C lib clean libzstd.pc     LIBDIR=/usr/local/lib     prefix=/foo
make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/include prefix=/foo

echo # should succeed
make -C lib clean libzstd.pc     LIBDIR=/usr/local/foo
make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/foo
make -C lib clean libzstd.pc     LIBDIR=/usr/local/
make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/
make -C lib clean libzstd.pc     LIBDIR=/usr/local
make -C lib clean libzstd.pc INCLUDEDIR=/usr/local
make -C lib clean libzstd.pc     LIBDIR=/tmp/foo prefix=/tmp
make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp
make -C lib clean libzstd.pc     LIBDIR=/tmp/foo prefix=/tmp/foo
make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp/foo

echo # should also succeed
make -C lib clean libzstd.pc prefix=/foo LIBDIR=/foo/bar INCLUDEDIR=/foo/
cat lib/libzstd.pc

mkdir out
cd out
cmake ../build/cmake
make
cat lib/libzstd.pc
```
2020-05-08 16:11:32 -04:00
Felix Handte
a036f60255
Merge pull request #2078 from nocnokneo/fix-destdir-installs
CMake: Fix DESTDIR installs and the Package Config file
2020-05-08 16:09:44 -04:00
Yann Collet
4f755bdafc faster cygwin test
The cygwin test on Appveyor is way too long (>30 mn).
The main issue is the very long zstreamtest, because no time out has been programmed.
Ensures that both fuzzer and zstreamtest receive a 30sec slot.
Should reduce cygwin tests duration by -30mn.
2020-05-05 14:08:35 -07:00
Bimba Shrestha
834a8f838a meson msvc build fix 2020-05-01 09:04:09 -05:00
Taylor Braun-Jones
105d9b62ae Minor CMake refactoring/simplification 2020-04-09 17:16:12 -04:00
Taylor Braun-Jones
b674a1eec3 Fix that installation of the libzstd.pc does not respect DESTDIR installations 2020-04-09 17:16:12 -04:00
Taylor Braun-Jones
c22551b903 Generate a better CMake Package Config file 2020-04-09 17:16:12 -04:00
Taylor Braun-Jones
5b054d9e90 Add support for running more tests via CTest 2020-03-30 15:14:00 -04:00
Taylor Braun-Jones
496d8c8b77 Respect the conventional BUILD_TESTS CMake option on the first configure 2020-03-23 17:49:04 -04:00
Felix Handte
b669c5347a
Revert "Fix pkg-config File Generation Again" (#2016) 2020-02-26 10:52:49 -08:00
W. Felix Handte
e668c9b528 Fix pkg-config File Generation Again
Revises #1851. Fixes #1900. Replaces #1930.

Thanks to @orbea, @neheb, @Polynomial-C, and particularly @eli-schwartz for
pointing out the problem and suggesting solutions.

Tested with

  ```
  make -C lib clean libzstd.pc
  cat lib/libzstd.pc

  # should fail
  make -C lib clean libzstd.pc     LIBDIR=/foo
  make -C lib clean libzstd.pc INCLUDEDIR=/foo
  make -C lib clean libzstd.pc     LIBDIR=/usr/localfoo
  make -C lib clean libzstd.pc INCLUDEDIR=/usr/localfoo
  make -C lib clean libzstd.pc     LIBDIR=/usr/local/lib     prefix=/foo
  make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/include prefix=/foo

  # should succeed
  make -C lib clean libzstd.pc     LIBDIR=/usr/local/foo
  make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/foo
  make -C lib clean libzstd.pc     LIBDIR=/usr/local/
  make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/
  make -C lib clean libzstd.pc     LIBDIR=/usr/local
  make -C lib clean libzstd.pc INCLUDEDIR=/usr/local
  make -C lib clean libzstd.pc     LIBDIR=/tmp/foo prefix=/tmp
  make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp
  make -C lib clean libzstd.pc     LIBDIR=/tmp/foo prefix=/tmp/foo
  make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp/foo

  # should also succeed
  make -C lib clean libzstd.pc prefix=/foo LIBDIR=/foo/bar INCLUDEDIR=/foo/
  cat lib/libzstd.pc

  mkdir out
  cd out
  cmake ../build/cmake
  make
  cat lib/libzstd.pc
  ```
2020-02-18 12:23:50 -05:00
Bimba Shrestha
6a4258a08a
Removing symbols already in unit tests and adding some new unit tests for missing symbols (#1985)
* Removing symbols that are not being tested

* Removing symbols used in zstdcli, fileio, dibio and benchzstd

* Removing symbols used in zbuff and add test-zbuff to travis

* Removing remaining symbols and adding unit tests instead

* Removing symbols test entirely
2020-02-05 16:55:00 -08:00
Nick Terrell
3ed0f65158 [cmake] Add playTests.sh as a test 2020-01-13 14:16:15 -08:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
23e997439a
Make idiomatic cmake install so third party cmake installers work right. 2019-12-06 17:18:54 +00:00
Nick Terrell
ac992b35a2 [cmake][tests] Add zstreamtest executable 2019-11-20 17:26:06 -08:00
Sen Huang
7ce891870c Fix merge conflicts 2019-11-05 15:51:25 -05:00
0x123456789A
9db11e3e42
Fixed check for building programs statically 2019-10-29 14:41:32 +01:00
0x123456789A
57a311d3b7
Consider ZSTD_PROGRAMS_LINK_SHARED
Actually consider ZSTD_PROGRAMS_LINK_SHARED in programs CMakeLists
2019-10-29 14:33:50 +01:00
0x123456789A
26ffc18634
Introduce ZSTD_PROGRAMS_LINK_SHARED
The CMake variable ZSTD_PROGRAMS_LINK_SHARED indicactes wether or not to link the zstd programs dynamically or statically.
2019-10-29 14:31:02 +01:00
Felix Handte
01ec595b85
Merge pull request #1851 from felixhandte/pkg-config-prefix-fix
In pkg-config File, Derive Lib and Include Dir from Prefix at Use-Time
2019-10-28 14:24:56 -04:00
W. Felix Handte
74bd76c3ff In pkg-config File, Derive Lib and Include Dir from Prefix at Use-Time
Addresses #1794. Instead of deriving the lib dir and include dir at
build-time, let's do it like everyone else does at pkg-config run-time.

This has the disadvantage that we can no longer override LIBDIR and
INCLUDEDIR in the Makefile and have that reflected in the .pc file.
2019-10-25 15:07:31 -04:00