Commit Graph

189 Commits

Author SHA1 Message Date
Lzu Tao
beb13bd87e Move contrib/meson to build/meson 2018-12-01 23:18:59 +07:00
Yann Collet
e4abd28769 fixed VS2010+ build script 2018-11-13 13:22:16 -08:00
Yann Collet
f15312e884 fixed cmake build script 2018-11-13 13:16:41 -08:00
Antoine Pitrou
2186fbcf67 Allow creating debug builds with CMake
Only set the build type to Release if the user didn't select any.
See discussion in https://github.com/facebook/zstd/pull/1278#issuecomment-436327923
and below.
2018-11-06 21:24:29 +01:00
Yann Collet
4ed9233db6 fixed VS2010 project 2018-10-26 11:25:40 -07:00
Yann Collet
2b4914082e created zstd_decompress_block module
isolate all logic associated with block decompression
into its own module.

zstd_decompress is still in charge
of context creation/destruction,
frames, headers, streaming, special blocks, etc.

Compressed blocks themselves are now handled within zstd_decompress_block .
2018-10-25 16:28:41 -07:00
Yann Collet
2f7e1c8737 fixed VS2010 build script 2018-10-23 17:44:43 -07:00
Yann Collet
ccd2d426fc separate DDict logic into its own module
created zstd_ddict.c within lib/decompress
2018-10-23 17:25:49 -07:00
Yann Collet
f2cff22804
Merge pull request #1368 from rkjain89/test-branch
Moving Code To util.c
2018-10-19 16:31:10 -07:00
Rohit Jain
c430c1068b Made the changes in zstd vcproj file for VS2008 as requested 2018-10-16 23:33:17 -07:00
Sam Russell
490f652974 Add man pages for zstdgrep and zstdless 2018-10-15 22:25:03 +13:00
Rohit Jain
9056fe2290 Adding util.c to zstd VS file 2018-10-12 14:22:05 -07:00
Rohit Jain
b91f982e1e Adding chagnes for cmake and VStudio 2018-10-12 14:08:13 -07:00
Yann Collet
33d643124d fixed fullbench-lib target 2018-10-04 18:12:36 -07:00
Yann Collet
9ac8f2d7b9 fixed VS2017Community build script
reported by @epicabsol
2018-10-03 18:42:44 -07:00
Yann Collet
b2939163e1 Changed default legacy support to v0.5+
thus dropping read support for v0.4.

It's always possible to re-enable it, by changing build macro ZSTD_LEGACY_SUPPORT to 4.
2018-09-20 14:30:20 -07:00
Jennifer Liu
9d6ed9def3 Merge fastCover into DictBuilder (#1274)
* Minor fix

* Run non-optimize FASTCOVER 5 times in benchmark

* Merge fastCover into dictBuilder

* Fix mixed declaration issue

* Add fastcover to symbol.c

* Add fastCover.c and cover.h to build

* Change fastCover.c to fastcover.c

* Update benchmark to run FASTCOVER in dictBuilder

* Undo spliting fastcover_param into cover_param and f

* Remove convert param functions

* Assign f to parameter

* Add zdict.h to Makefile in lib

* Add cover.h to BUCK

* Cast 1 to U64 before shifting

* Remove trimming of zero freq head and tail in selectSegment and rebenchmark

* Remove f as a separate parameter of tryParam

* Read 8 bytes when d is 6

* Add trimming off zero frequency head and tail

* Use best functions from COVER and remove trimming part(which leads to worse compression ratio after previous bugs were fixed)

* Add finalize= argument to FASTCOVER to specify percentage of training samples passed to ZDICT_finalizeDictionary

* Change nbDmer to always read 8 bytes even when d=6

* Add skip=# argument to allow skipping dmers in computeFrequency in FASTCOVER

* Update comments and benchmarking result

* Change default method of ZDICT_trainFromBuffer to ZDICT_optimizeTrainFromBuffer_fastCover

* Add dictType enum and fix bug about passing zParam when converting to coverParam

* Combine finalize and skip into a single parameter

* Update acceleration parameters and benchmark on 3 sample sets

* Change default splitPoint of FASTCOVER to 0.75 and benchmark first 3 sample sets

* Initialize variables outside of for loop in benchmark.c

* Update benchmark result for hg-manifest

* Remove cover.h from install-includes

* Add explanation of f

* Set default compression level for trainFromBuffer to 3

* Add assertion of fastCoverParams in DiB_trainFromFiles

* Add checkTotalCompressedSize function + some minor fixes

* Add test for multithreading fastCovr

* Initialize segmentFreqs in every FASTCOVER_selectSegment and move mutex_unnlock to end of COVER_best_finish

* Free segmentFreqs

* Initialize segmentFreqs before calling FASTCOVER_buildDictionary instead of in FASTCOVER_selectSegment

* Add FASTCOVER_MEMMULT

* Minor fix

* Update benchmarking result
2018-08-23 12:06:20 -07:00
Timo Gurr
e400a86f17 Use GNUInstallDirs DOCDIR for installing the manual 2018-08-17 13:50:00 +02:00
Eden Zik
a6df961497 Cmake now builds with CMAKE_BUILD_TYPE=Release by default, both while
being invoked from the main Makefile (via cmakebuild) or directly from
the build/cmake directory. Suggested by @pdknsk (#1081).
2018-08-13 20:28:52 -04:00
cyan4973
e85b4c56b2 speed up appveyor tests 2018-07-30 17:13:13 +02:00
Yann Collet
689bfecd48
Merge pull request #1188 from GeorgeLu97/BenchModule
Bench module
2018-07-02 13:33:27 -07:00
oleid
4e196b2ac3
Correct multithread logic, fixing 'unsupported parameter' error
The original conditions only worked, when both, static and shared variants where built, resulting in an inconsistency between programs and library. The program was built with MT support enabled, the library not. That lead to error 11 'unsupported parameter' when compressing anything with the command line tool.

When changing the AND condition to `ZSTD_MULTITHREAD_SUPPORT AND (ZSTD_BUILD_SHARED OR ZSTD_BUILD_SHARED)`, cmake stopps complaining one of the targets wasn't built. This commit works for any case.
2018-06-26 08:36:41 +02:00
cyan4973
ae0b7ffa0a made Visual Studio compatible with DEBUGLEVEL >= 2 2018-06-20 09:45:02 -07:00
George Lu
8522346322 Make Fullbench use new function
Rearrange Args
Add nothing function
Use new function, change locals to match
New Display
Comment cleanup
Change builds
2018-06-15 11:37:49 -04:00
Yann Collet
507bef196d added debug.h for cmake 2018-06-14 19:48:40 -04:00
Yann Collet
78e5e2887e Visual Studio project blind fix 2018-06-14 16:30:52 -04:00
Yann Collet
2d76defbfe grouped all histogram functions into hist.c
renamed functions with HIST_* prefix
2018-06-13 19:49:31 -04:00
cyan4973
b095bffac6 ignore Windows build/test artefacts 2018-05-01 05:45:46 -07:00
Nick Terrell
268cc2a516 Fix CMake build
`MAN_INSTALL_DIR` was undefined.

Tested with `make cmakebuild`, and saw that the man pages got installed to the right place:

```
-- Installing: /Users/terrelln/install_test_dir/lib/pkgconfig/libzstd.pc
-- Installing: /Users/terrelln/install_test_dir/include/zstd.h
-- Installing: /Users/terrelln/install_test_dir/include/zbuff.h
-- Installing: /Users/terrelln/install_test_dir/include/zdict.h
-- Installing: /Users/terrelln/install_test_dir/include/zstd_errors.h
-- Installing: /Users/terrelln/install_test_dir/lib/libzstd.1.3.4.dylib
-- Installing: /Users/terrelln/install_test_dir/lib/libzstd.dylib
-- Installing: /Users/terrelln/install_test_dir/lib/libzstd.a
-- Installing: /Users/terrelln/install_test_dir/bin/zstd
-- Up-to-date: /Users/terrelln/install_test_dir/bin/zstd
-- Installing: /Users/terrelln/install_test_dir/bin/zstdcat
-- Installing: /Users/terrelln/install_test_dir/bin/unzstd
-- Installing: /Users/terrelln/install_test_dir/share/man/man1/zstd.1
-- Installing: /Users/terrelln/install_test_dir/share/man/man1/zstdcat.1
-- Installing: /Users/terrelln/install_test_dir/share/man/man1/unzstd.1
-- Installing: /Users/terrelln/install_test_dir/bin/zstdmt
-- Installing: /Users/terrelln/install_test_dir/bin/pzstd
-- Installing: /Users/terrelln/install_test_dir/zstd_manual.html
```
2018-03-26 14:59:26 -07:00
Yann Collet
bffb4b46a1 updated VS studio readme 2018-03-26 09:55:10 -07:00
Yann Collet
2dc31dc842
Merge pull request #1065 from HaydnTrigg/dev
Generic Visual Studio 2017 build script
2018-03-26 09:21:12 -07:00
Haydn Trigg
2960f74c29 Swapped VS2017 preference order 2018-03-26 02:03:53 +10:30
Haydn Trigg
57e6b98eb1 Refined build script 2018-03-22 09:10:39 +10:30
Haydn Trigg
321de5682c Generic Visual Studio 2017 build script 2018-03-21 22:57:42 +10:30
Varunram
0034c759b0 Update man page variables in CMakeLists 2018-03-21 14:10:42 +05:30
Varunram
90c598f089 Add missing checks to CMakeLists;closes #1023 2018-03-18 15:48:58 +05:30
Haydn Trigg
c6351021e4 Visual Studio 2017 build scripts 2018-03-11 00:15:31 +10:30
Alexey Ivanov
22303da601 CMake: fixed multithreading build on Windows
`ZSTD_MULTITHREAD_SUPPORT` option fixed for Windows.

Signed-off-by: Alexey Ivanov <alexey.ivanes@gmail.com>
2018-01-17 10:27:52 +03:00
Alexey Ivanov
403e2db139 CMake: use GNUInstallDirs for library install dir
Libraries now will be installed in the correct directory on x86_64 linux systems,
and can be changed with `-DCMAKE_INSTALL_LIBDIR=<dirname>` option.
2018-01-15 22:48:46 +03:00
Yann Collet
72c0f4574c cmake: fixed lib/CMakeLists.txt
changed file name from zstd_compress.h to zstd_compress_internal.h
2017-11-10 09:39:11 -08:00
Stella Lau
360428c5d9 Move ldm functions to their own file 2017-09-06 18:09:26 -07:00
Nick Terrell
a4eac0db29 Update build scripts 2017-09-05 17:10:29 -07:00
Yann Collet
b0cb081dc8 last batch of header files changed to reflect new license (#825)
only remains to update contrib/linux-kernel (@terrelln)
2017-08-31 12:20:50 -07:00
Yann Collet
e21384fffb fixed more file headers after license change (#825) 2017-08-31 12:11:57 -07:00
Yann Collet
e9dc204f42 fixed a bunch of headers after license change (#825) 2017-08-31 11:24:54 -07:00
Jacques Germishuys
c325c8db82 fix missing symbol 'nanosleep' for Solaris 2017-07-11 19:26:10 +02:00
Yann Collet
ef269c1b68 Merge pull request #725 from facebook/advancedAPI2
New Advanced API
2017-06-23 09:50:47 -07:00
Yann Collet
008d44ad66 fix attempt : fullbench VS2008 project 2017-06-19 17:45:43 -07:00
Yann Collet
fe234bf48b fix attempts : fullbench for VS2008 2017-06-19 15:23:19 -07:00
cyan4973
51235393e3 fixed fullbench project for VS2010+ 2017-06-04 22:06:25 -07:00
Paul Cruz
fa398bbed7 added back documentation/notification for VS2005 in build directory 2017-06-02 10:25:30 -07:00
Paul Cruz
0ff9873324 Removed VS2005 from the list of included projects 2017-06-02 10:11:03 -07:00
Paul Cruz
6dc508539c Moved VS2005 to the contrib directory 2017-06-01 21:18:48 -07:00
codicodi
e87cad1053 CMake improvements 2017-05-24 10:56:35 +02:00
Yann Collet
d0b1846cf4 ignore more cmake build artefacts 2017-04-21 10:59:36 -07:00
Michael Maltese
9eda436733 CMake: don't modify global C_FLAGS and CXX_FLAGS 2017-04-20 19:30:38 -07:00
Michael Maltese
377401f161 CMake: don't recheck compile flags every time
Doesn't cause a problem when embedded within a larger project, but is
annoying.
2017-04-20 19:30:38 -07:00
Michael Maltese
554a13dd4b CMake: various configure_file fixes to use CMAKE_CURRENT_SOURCE_DIR 2017-04-20 19:30:38 -07:00
Michael Maltese
7f1fb95566 CMake: namespace modules and set CMAKE_MODULE_PATH 2017-04-20 19:30:37 -07:00
Michael Maltese
1a96bec8db CMake: Set ZSTD_SOURCE_DIR from CMAKE_CURRENT_SOURCE_DIR
Instead of CMAKE_SOURCE_DIR, which is not correct when embedding Zstd
within a larger project.
2017-04-20 15:56:53 -07:00
Milan Ševčík
eb7371f179 Change all SET_TARGET_PROPERTIES to SET_PROPERTY
SET_PROPERTY function can append to lists, whereas previously used
SET_TARGET_PROPERTIES cannot.
2017-04-19 21:34:17 +02:00
Milan Ševčík
cba4e79a93 Create and install pkg-config file with cmake 2017-04-19 21:34:17 +02:00
Milan Ševčík
fce21777bd Copy files during build phase, custom targets instead of commands
Previously some files were copied only during configure phase.
Custom targets seem nicer.
2017-04-19 21:34:17 +02:00
Milan Ševčík
522df42e10 Add lzma and zlib support to cmake build system
cmake 2.8.9 needed for FindLibLZMA
2017-04-19 21:34:17 +02:00
Sean Purcell
5a61f36474 Make zstd compile with mt by default 2017-04-17 12:06:02 -07:00
Yann Collet
3d58a1f9b9 fixed Visual fuzzer project 2017-03-30 12:28:09 -07:00
Yann Collet
2bcefcc50d fixed Visual Studio projects 2017-03-29 22:03:27 -07:00
Yann Collet
35fc66f257 updated .gitignore for new cmake script 2017-03-21 17:52:42 -07:00
Sean Purcell
f7a78609e7 CMake: Fix version parsing and allow Unix flags on Clang 2017-03-21 13:44:33 -07:00
Milan Ševčík
5b3a9cbed2 Remove multithreading support by default on non UNIX platforms 2017-03-21 13:00:05 +01:00
Milan Ševčík
a2286a333c Install zstdcat and unzstd symlinks by cmake 2017-03-21 11:11:53 +01:00
Milan Ševčík
01d7ea27e9 Added options for building programs, static library and tests 2017-03-21 11:11:53 +01:00
Milan Ševčík
16f771dfb1 Install forgotten zstdmt tool and zstd.1 man page 2017-03-21 11:11:53 +01:00
Milan Ševčík
f0076adccb Add_extra_compilation_flags macro needs to run before adding sources
Also adding comments in the top-level CMakeLists.txt
2017-03-21 11:11:53 +01:00
Milan Ševčík
b98b6fcf41 Check for pthreads library 2017-03-21 11:11:45 +01:00
Milan Ševčík
0d3daffa2f Much easier way of installing libraries with correct names 2017-03-21 10:43:11 +01:00
Milan Ševčík
c2430434df Install everything, not only libraries 2017-03-21 10:43:11 +01:00
Milan Ševčík
ce11d77e4d Use shared library in programs 2017-03-21 10:43:11 +01:00
Milan Ševčík
0184d80e8e Refactored AddExtraCompilationFlags
- Easier addition of new flags
 - Removed flags not used by default
 - Removed implicit PIC flag for all targets
2017-03-21 10:43:08 +01:00
Milan Ševčík
56ef200fcb .gitignore only build directory 2017-03-21 10:38:48 +01:00
Milan Ševčík
e8517a95f3 Add build documentation by gen_html 2017-03-21 10:38:48 +01:00
Milan Ševčík
c03d7b898d Cleanup lib rules 2017-03-21 10:38:48 +01:00
Milan Ševčík
623baf513e Move GetLibraryVersion function to its own module file 2017-03-21 10:38:48 +01:00
Milan Ševčík
8013c86c7d Improve resolving ROOT_DIR 2017-03-21 10:38:46 +01:00
Sean Purcell
120df494e9 Update builds to not support legacy v01-v03 2017-03-13 14:44:08 -07:00
Milan Ševčík
4b62f41969 Added compile flags to pzstd
Definition NDEBUG from original Makefile
-Wno-shadow silences shadowing in initializers
2017-02-28 10:57:09 +01:00
Milan Ševčík
eeb080e601 -Wstrict-prototypes is not supported with C++ 2017-02-28 10:57:09 +01:00
Milan Ševčík
5a1cc5c22d Improve handling of library symlinks.
Previous method was failing to remove the symlinks when make clean was
invoked and wasn't portable.
2017-02-28 10:57:09 +01:00
Milan Ševčík
bf8a30ce0d Add zstdmt target in cmake 2017-02-28 10:57:09 +01:00
Milan Ševčík
59709d97d9 Support building contrib utils from cmake 2017-02-28 10:57:09 +01:00
Yann Collet
cc3d1bc262 Merge pull request #525 from terrelln/covermt
Multithreaded COVER dictionary training
2017-01-30 10:15:33 -08:00
Nick Terrell
90db3afdee Fix typos in VS2010 build config 2017-01-27 17:32:16 -08:00
Nick Terrell
6570167f8b Fix VS fuzzer build configs 2017-01-27 13:56:41 -08:00
Nick Terrell
8959910412 Add threading and pool to build configs 2017-01-27 12:29:27 -08:00
Nick Terrell
1f1a336241 Fix cmake build 2017-01-27 10:27:29 -08:00
Nick Terrell
9aa1aa13c1 Fix Visual Studios project 2017-01-26 16:52:47 -08:00
Yann Collet
d7e3cb58c5 Resolved merge conflict dev+zstdmt 2017-01-20 16:44:50 -08:00
cyan4973
f0ffa237da fixed VS2008 project 2017-01-20 15:24:06 -08:00
cyan4973
326575c3a3 fixed VS2010 project 2017-01-20 14:49:44 -08:00
Nick Terrell
9103ed6c8b Add cover.c to build files 2017-01-02 13:22:53 -08:00