Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kpu/kenlm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2022-07-03 19:32:47 +0300
committerKenneth Heafield <github@kheafield.com>2022-07-03 19:32:47 +0300
commitbcd4af619a2fa45f5876d8855f7876cc09f663af (patch)
tree7f04f2ad2f7ddadac961acdc841ae1a706ac95b8
parent568df4a23827f409f132146e93ab0f7c191296df (diff)
Define HAVE_CLOCKGETTIME on Linux for pip installHEADmaster
-rw-r--r--setup.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 9e0f0d1..38738cb 100644
--- a/setup.py
+++ b/setup.py
@@ -20,16 +20,17 @@ for element in is_max_order:
FILES = glob.glob('util/*.cc') + glob.glob('lm/*.cc') + glob.glob('util/double-conversion/*.cc') + glob.glob('python/*.cc')
FILES = [fn for fn in FILES if not (fn.endswith('main.cc') or fn.endswith('test.cc'))]
+#We don't need -std=c++11 but python seems to be compiled with it now. https://github.com/kpu/kenlm/issues/86
+ARGS = ['-O3', '-DNDEBUG', '-DKENLM_MAX_ORDER='+max_order, '-std=c++11']
+
if platform.system() == 'Linux':
LIBS = ['stdc++', 'rt']
+ ARGS.append('-DHAVE_CLOCKGETTIME')
elif platform.system() == 'Darwin':
LIBS = ['c++']
else:
LIBS = []
-#We don't need -std=c++11 but python seems to be compiled with it now. https://github.com/kpu/kenlm/issues/86
-ARGS = ['-O3', '-DNDEBUG', '-DKENLM_MAX_ORDER='+max_order, '-std=c++11']
-
#Attempted fix to https://github.com/kpu/kenlm/issues/186 and https://github.com/kpu/kenlm/issues/197
if platform.system() == 'Darwin':
ARGS += ["-stdlib=libc++", "-mmacosx-version-min=10.7"]