Skip to content

Commit

Permalink
platform if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
kpu committed Mar 26, 2018
1 parent 9edfce5 commit f933d44
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ def compile_test(header, library):
FILES = glob.glob('util/*.cc') + glob.glob('lm/*.cc') + glob.glob('util/double-conversion/*.cc')
FILES = [fn for fn in FILES if not (fn.endswith('main.cc') or fn.endswith('test.cc'))]

LIBS = ['stdc++']
if platform.system() != 'Darwin':
LIBS.append('rt')
if platform.system() == 'Linux':
LIBS = ['stdc++', 'rt']
elif platform.system() == 'Darwin':
LIBS = ['stdc++']
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=6', '-std=c++11']
Expand Down

0 comments on commit f933d44

Please sign in to comment.