summaryrefslogtreecommitdiff
path: root/klm/util
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2015-03-03 01:14:07 -0500
committerChris Dyer <redpony@gmail.com>2015-03-03 01:14:07 -0500
commit95183b5760d7f168ae093ae8f9b29740628a278f (patch)
tree4c213e940a80a08d60141d11ec35cbe8f17d4755 /klm/util
parentc7b2a39958912d7b85a384a871609e6db73042c7 (diff)
migration to cmake
Diffstat (limited to 'klm/util')
-rw-r--r--klm/util/CMakeLists.txt53
-rw-r--r--klm/util/Makefile.am66
-rw-r--r--klm/util/double-conversion/CMakeLists.txt24
-rw-r--r--klm/util/double-conversion/Makefile.am23
-rw-r--r--klm/util/stream/CMakeLists.txt20
-rw-r--r--klm/util/stream/Makefile.am21
6 files changed, 97 insertions, 110 deletions
diff --git a/klm/util/CMakeLists.txt b/klm/util/CMakeLists.txt
new file mode 100644
index 00000000..bef1db78
--- /dev/null
+++ b/klm/util/CMakeLists.txt
@@ -0,0 +1,53 @@
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+set(cat_compressed_SRCS cat_compressed_main.cc)
+
+add_executable(cat_compressed ${cat_compressed_SRCS})
+target_link_libraries(cat_compressed klm_util)
+
+set(klm_util_STAT_SRCS
+ bit_packing.cc
+ bit_packing.hh
+ ersatz_progress.cc
+ ersatz_progress.hh
+ exception.cc
+ exception.hh
+ fake_ofstream.hh
+ file.cc
+ file.hh
+ file_piece.cc
+ file_piece.hh
+ fixed_array.hh
+ getopt.c
+ getopt.hh
+ have.hh
+ joint_sort.hh
+ mmap.cc
+ mmap.hh
+ multi_intersection.hh
+ murmur_hash.cc
+ murmur_hash.hh
+ parallel_read.cc
+ parallel_read.hh
+ pcqueue.hh
+ pool.cc
+ pool.hh
+ probing_hash_table.hh
+ proxy_iterator.hh
+ read_compressed.cc
+ read_compressed.hh
+ scoped.cc
+ scoped.hh
+ sized_iterator.hh
+ sorted_uniform.hh
+ string_piece.cc
+ string_piece.hh
+ string_piece_hash.hh
+ thread_pool.hh
+ tokenize_piece.hh
+ unistd.hh
+ usage.cc
+ usage.hh)
+
+add_library(klm_util STATIC ${klm_util_STAT_SRCS})
+
diff --git a/klm/util/Makefile.am b/klm/util/Makefile.am
deleted file mode 100644
index 5db6e340..00000000
--- a/klm/util/Makefile.am
+++ /dev/null
@@ -1,66 +0,0 @@
-
-noinst_PROGRAMS = cat_compressed
-
-cat_compressed_SOURCES = cat_compressed_main.cc
-cat_compressed_LDADD = libklm_util.a
-
-#TESTS = \
-# file_piece_test \
-# joint_sort_test \
-# key_value_packing_test \
-# probing_hash_table_test \
-# sorted_uniform_test
-# file_piece_test \
-# joint_sort_test \
-# key_value_packing_test \
-# probing_hash_table_test \
-# sorted_uniform_test
-
-noinst_LIBRARIES = libklm_util.a
-
-libklm_util_a_SOURCES = \
- bit_packing.cc \
- bit_packing.hh \
- ersatz_progress.cc \
- ersatz_progress.hh \
- exception.cc \
- exception.hh \
- fake_ofstream.hh \
- file.cc \
- file.hh \
- file_piece.cc \
- file_piece.hh \
- fixed_array.hh \
- getopt.c \
- getopt.hh \
- have.hh \
- joint_sort.hh \
- mmap.cc \
- mmap.hh \
- multi_intersection.hh \
- murmur_hash.cc \
- murmur_hash.hh \
- parallel_read.cc \
- parallel_read.hh \
- pcqueue.hh \
- pool.cc \
- pool.hh \
- probing_hash_table.hh \
- proxy_iterator.hh \
- read_compressed.cc \
- read_compressed.hh \
- scoped.cc \
- scoped.hh \
- sized_iterator.hh \
- sorted_uniform.hh \
- string_piece.cc \
- string_piece.hh \
- string_piece_hash.hh \
- thread_pool.hh \
- tokenize_piece.hh \
- unistd.hh \
- usage.cc \
- usage.hh
-
-AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/klm -I$(top_srcdir)/klm/util/double-conversion
-
diff --git a/klm/util/double-conversion/CMakeLists.txt b/klm/util/double-conversion/CMakeLists.txt
new file mode 100644
index 00000000..df4162dc
--- /dev/null
+++ b/klm/util/double-conversion/CMakeLists.txt
@@ -0,0 +1,24 @@
+
+
+set(klm_util_double_STAT_SRCS
+ bignum-dtoa.h
+ bignum.h
+ cached-powers.h
+ diy-fp.h
+ double-conversion.h
+ fast-dtoa.h
+ fixed-dtoa.h
+ ieee.h
+ strtod.h
+ utils.h
+ bignum.cc
+ bignum-dtoa.cc
+ cached-powers.cc
+ diy-fp.cc
+ double-conversion.cc
+ fast-dtoa.cc
+ fixed-dtoa.cc
+ strtod.cc)
+
+add_library(klm_util_double STATIC ${klm_util_double_STAT_SRCS})
+
diff --git a/klm/util/double-conversion/Makefile.am b/klm/util/double-conversion/Makefile.am
deleted file mode 100644
index dfcfb009..00000000
--- a/klm/util/double-conversion/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-noinst_LIBRARIES = libklm_util_double.a
-
-libklm_util_double_a_SOURCES = \
- bignum-dtoa.h \
- bignum.h \
- cached-powers.h \
- diy-fp.h \
- double-conversion.h \
- fast-dtoa.h \
- fixed-dtoa.h \
- ieee.h \
- strtod.h \
- utils.h \
- bignum.cc \
- bignum-dtoa.cc \
- cached-powers.cc \
- diy-fp.cc \
- double-conversion.cc \
- fast-dtoa.cc \
- fixed-dtoa.cc \
- strtod.cc
-
-AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/klm -I$(top_srcdir)/klm/util/double-conversion
diff --git a/klm/util/stream/CMakeLists.txt b/klm/util/stream/CMakeLists.txt
new file mode 100644
index 00000000..3ca25f17
--- /dev/null
+++ b/klm/util/stream/CMakeLists.txt
@@ -0,0 +1,20 @@
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../..)
+
+set(klm_util_stream_STAT_SRCS
+ block.hh
+ chain.cc
+ chain.hh
+ config.hh
+ io.cc
+ io.hh
+ line_input.cc
+ line_input.hh
+ multi_progress.cc
+ multi_progress.hh
+ multi_stream.hh
+ sort.hh
+ stream.hh
+ timer.hh)
+
+add_library(klm_util_stream STATIC ${klm_util_stream_STAT_SRCS})
+
diff --git a/klm/util/stream/Makefile.am b/klm/util/stream/Makefile.am
deleted file mode 100644
index 25817b50..00000000
--- a/klm/util/stream/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-noinst_LIBRARIES = libklm_util_stream.a
-
-libklm_util_stream_a_SOURCES = \
- block.hh \
- chain.cc \
- chain.hh \
- config.hh \
- io.cc \
- io.hh \
- line_input.cc \
- line_input.hh \
- multi_progress.cc \
- multi_progress.hh \
- multi_stream.hh \
- sort.hh \
- stream.hh \
- timer.hh
-
-AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/klm
-
-#-I$(top_srcdir)/klm/util/double-conversion