diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-10-30 23:33:22 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-10-30 23:33:22 +0400 |
commit | 4b98b0937cfcf8932b8cad2822dc01f9562353fd (patch) | |
tree | 6afb9273399ef2cdbe6a93e17a54036cb5426826 /util/Jamfile | |
parent | 06126ae6e259fc619073f09a9d1de9d0b8f109fd (diff) |
Add bzip and xz input for FilePiece KenLM 06f78db2
Diffstat (limited to 'util/Jamfile')
-rw-r--r-- | util/Jamfile | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/util/Jamfile b/util/Jamfile index ef2d1bb96..202c376ad 100644 --- a/util/Jamfile +++ b/util/Jamfile @@ -1,9 +1,28 @@ -lib kenutil : bit_packing.cc ersatz_progress.cc exception.cc file.cc file_piece.cc mmap.cc murmur_hash.cc pool.cc string_piece.cc usage.cc /top//z : <include>.. : : <include>.. ; +local compressed_flags = <include>.. <define>HAVE_ZLIB ; +local compressed_deps = /top//z ; +if [ test_flags "-lbz2" ] { + external-lib bz2 ; + compressed_flags += <define>HAVE_BZLIB ; + compressed_deps += bz2 ; +} +if [ test_flags "-llzma" ] { + external-lib lzma ; + compressed_flags += <define>HAVE_XZLIB ; + compressed_deps += lzma ; +} + +obj read_compressed.o : read_compressed.cc : $(compressed_flags) ; +alias read_compressed : read_compressed.o $(compressed_deps) ; +obj read_compressed_test.o : read_compressed_test.cc /top//boost_unit_test_framework : $(compressed_flags) ; +obj file_piece_test.o : file_piece_test.cc /top//boost_unit_test_framework : $(compressed_flags) ; + +lib kenutil : bit_packing.cc ersatz_progress.cc exception.cc file.cc file_piece.cc mmap.cc murmur_hash.cc pool.cc read_compressed string_piece.cc usage.cc : <include>.. : : <include>.. ; import testing ; unit-test bit_packing_test : bit_packing_test.cc kenutil /top//boost_unit_test_framework ; -run file_piece_test.cc kenutil /top//boost_unit_test_framework : : file_piece.cc ; +run file_piece_test.o kenutil /top//boost_unit_test_framework : : file_piece.cc ; +unit-test read_compressed_test : read_compressed_test.o kenutil /top//boost_unit_test_framework ; unit-test joint_sort_test : joint_sort_test.cc kenutil /top//boost_unit_test_framework ; unit-test probing_hash_table_test : probing_hash_table_test.cc kenutil /top//boost_unit_test_framework ; unit-test sorted_uniform_test : sorted_uniform_test.cc kenutil /top//boost_unit_test_framework ; |