]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed cmake
authorYann Collet <yann.collet.73@gmail.com>
Sun, 29 May 2016 00:02:24 +0000 (02:02 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Sun, 29 May 2016 00:02:24 +0000 (02:02 +0200)
fixed playTests

programs/tests/playTests.sh
projects/cmake/.gitignore [new file with mode: 0644]
projects/cmake/lib/CMakeLists.txt
projects/cmake/programs/.gitignore [new file with mode: 0644]
projects/cmake/programs/CMakeLists.txt

index dbeb916d0a7bc470446736dbf88502fc107abe8f..479ffecae62691a10291b19eb1f1407f19b666ad 100755 (executable)
@@ -39,13 +39,13 @@ $ZSTD -df tmp.zst                        # trivial decompression case (overwrite
 $ECHO "test : too large compression level (must fail)"
 $ZSTD -99 tmp && die "too large compression level undetected"
 $ECHO "test : compress to stdout"
-$ZSTD tmp -c > tmpCompressed                 
+$ZSTD tmp -c > tmpCompressed
 $ZSTD tmp --stdout > tmpCompressed       # long command format
 $ECHO "test : null-length file roundtrip"
 $ECHO -n '' | $ZSTD - --stdout | $ZSTD -d --stdout
 $ECHO "test : decompress file with wrong suffix (must fail)"
 $ZSTD -d tmpCompressed && die "wrong suffix error not detected!"
-$ZSTD -d tmpCompressed -c > tmpResult    # decompression using stdout   
+$ZSTD -d tmpCompressed -c > tmpResult    # decompression using stdout
 $ZSTD --decompress tmpCompressed -c > tmpResult
 $ZSTD --decompress tmpCompressed --stdout > tmpResult
 if [ "$isWindows" = false ] ; then
@@ -124,9 +124,9 @@ $ECHO "\n**** dictionary tests **** "
 ./datagen -g1M | $ZSTD -D tmpDict | $ZSTD -D tmpDict -dvq | md5sum > tmp2
 diff -q tmp1 tmp2
 $ZSTD --train *.c *.h -o tmpDict
-$ZSTD xxhash.c -D tmpDict -of tmp
+$ZSTD zstd_compress.c -D tmpDict -of tmp
 $ZSTD -d tmp -D tmpDict -of result
-diff xxhash.c result
+diff zstd_compress.c result
 
 
 $ECHO "\n**** multiple files tests **** "
@@ -171,7 +171,7 @@ roundTripTest -g127K      # TableID==2
 roundTripTest -g255K      # TableID==1
 roundTripTest -g513K      # TableID==0
 roundTripTest -g512K 6    # greedy, hash chain
-roundTripTest -g512K 16   # btlazy2 
+roundTripTest -g512K 16   # btlazy2
 roundTripTest -g512K 19   # btopt
 
 rm tmp*
@@ -210,4 +210,3 @@ roundTripTest -g99000000 -P99 20
 roundTripTest -g6000000000 -P99 1
 
 rm tmp*
-
diff --git a/projects/cmake/.gitignore b/projects/cmake/.gitignore
new file mode 100644 (file)
index 0000000..98f29c7
--- /dev/null
@@ -0,0 +1,6 @@
+# cmake producted
+CMakeCache.txt
+CMakeFiles
+Makefile
+cmake_install.cmake
+cmake_uninstall.cmake
index dae706cbe6fc783f4536673bc5b5d3a6b1671469..834818bfe86f9545a169d5b45071e61e48787484 100644 (file)
@@ -2,19 +2,19 @@
 # zstd - Makefile
 # Copyright (C) Yann Collet 2014-2016
 # All rights reserved.
-# 
+#
 # BSD license
 #
 # Redistribution and use in source and binary forms, with or without modification,
 # are permitted provided that the following conditions are met:
-# 
+#
 # * Redistributions of source code must retain the above copyright notice, this
 #   list of conditions and the following disclaimer.
-# 
+#
 # * Redistributions in binary form must reproduce the above copyright notice, this
 #   list of conditions and the following disclaimer in the documentation and/or
 #   other materials provided with the distribution.
-# 
+#
 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -25,7 +25,7 @@
 # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# 
+#
 # You can contact the author at :
 #  - zstd homepage : http://www.zstd.net/
 # ################################################################
@@ -59,6 +59,7 @@ MESSAGE("ZSTD VERSION ${LIBVER_MAJOR}.${LIBVER_MINOR}.${LIBVER_RELEASE}")
 SET(Sources
         ${LIBRARY_DIR}/common/entropy_common.c
         ${LIBRARY_DIR}/common/zstd_common.c
+        ${LIBRARY_DIR}/common/xxhash.c
         ${LIBRARY_DIR}/common/fse_decompress.c
         ${LIBRARY_DIR}/compress/fse_compress.c
         ${LIBRARY_DIR}/compress/huf_compress.c
diff --git a/projects/cmake/programs/.gitignore b/projects/cmake/programs/.gitignore
new file mode 100644 (file)
index 0000000..81eec34
--- /dev/null
@@ -0,0 +1,8 @@
+# produced by make
+datagen
+fullbench
+fuzzer
+paramgrill
+zbufftest
+zstd
+zstd-frugal
index 3b4f51d7923500b249d410bca715f74205ba8b6a..f93f3f38c77152892bc4c571f096b2c90cdea66e 100644 (file)
@@ -58,13 +58,13 @@ IF (ZSTD_LEGACY_SUPPORT)
     SET(ZSTD_FILEIO_LEGACY ${PROGRAMS_LEGACY_DIR}/fileio_legacy.c)
 ENDIF (ZSTD_LEGACY_SUPPORT)
 
-ADD_EXECUTABLE(zstd ${PROGRAMS_DIR}/zstdcli.c ${PROGRAMS_DIR}/fileio.c ${PROGRAMS_DIR}/bench.c ${PROGRAMS_DIR}/xxhash.c ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/dibio.c ${ZSTD_FILEIO_LEGACY})
+ADD_EXECUTABLE(zstd ${PROGRAMS_DIR}/zstdcli.c ${PROGRAMS_DIR}/fileio.c ${PROGRAMS_DIR}/bench.c ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/dibio.c ${ZSTD_FILEIO_LEGACY})
 TARGET_LINK_LIBRARIES(zstd libzstd_static)
 
 ADD_EXECUTABLE(fullbench ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/fullbench.c)
 TARGET_LINK_LIBRARIES(fullbench libzstd_static)
 
-ADD_EXECUTABLE(fuzzer ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/xxhash.c ${PROGRAMS_DIR}/fuzzer.c)
+ADD_EXECUTABLE(fuzzer ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/fuzzer.c)
 TARGET_LINK_LIBRARIES(fuzzer libzstd_static)
 
 IF (UNIX)
@@ -72,10 +72,10 @@ IF (UNIX)
     TARGET_LINK_LIBRARIES(zstd-frugal libzstd_static)
     SET_TARGET_PROPERTIES(zstd-frugal PROPERTIES COMPILE_DEFINITIONS "ZSTD_NOBENCH;ZSTD_NODICT")
 
-    ADD_EXECUTABLE(zbufftest ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/xxhash.c ${PROGRAMS_DIR}/zbufftest.c)
+    ADD_EXECUTABLE(zbufftest ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/zbufftest.c)
     TARGET_LINK_LIBRARIES(zbufftest libzstd_static)
 
-    ADD_EXECUTABLE(paramgrill ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/xxhash.c ${PROGRAMS_DIR}/paramgrill.c)
+    ADD_EXECUTABLE(paramgrill ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/paramgrill.c)
     TARGET_LINK_LIBRARIES(paramgrill libzstd_static m) #m is math library
 
     ADD_EXECUTABLE(datagen ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/datagencli.c)