File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Python_add_library(
20
20
${KENLM_PYTHON_STANDALONE_SRCS} python/kenlm.cpp
21
21
)
22
22
23
+ set_property (TARGET kenlm PROPERTY CXX_STANDARD 11)
23
24
target_include_directories (kenlm PRIVATE ${PROJECT_SOURCE_DIR} )
24
25
target_compile_definitions (kenlm PRIVATE KENLM_MAX_ORDER=${KENLM_MAX_ORDER} )
25
26
Original file line number Diff line number Diff line change 1
1
from setuptools import setup , Extension
2
2
from setuptools .command .build_ext import build_ext as _build_ext
3
- import glob
4
3
import platform
5
4
import subprocess
6
5
import os
@@ -40,7 +39,6 @@ def run(self):
40
39
"-DBUILD_SHARED_LIBS=ON" ,
41
40
"-DBUILD_PYTHON_STANDALONE=ON" ,
42
41
f"-DKENLM_MAX_ORDER={ max_order } " ,
43
- f"-DPYTHON_EXECUTABLE={ sys .executable } " ,
44
42
f"-DCMAKE_PROJECT_VERSION={ VERSION } " ,
45
43
]
46
44
cfg = "Debug" if self .debug else "Release"
@@ -55,8 +53,9 @@ def run(self):
55
53
]
56
54
if sys .maxsize > 2 ** 32 :
57
55
cmake_args += ["-A" , "x64" ]
56
+ # build_args += ["--", "/m"]
58
57
else :
59
- cmake_args += [ "-DCMAKE_BUILD_TYPE=" + cfg ]
58
+ cmake_args . append ( f "-DCMAKE_BUILD_TYPE={ cfg } " )
60
59
61
60
env = os .environ .copy ()
62
61
env ["CXXFLAGS" ] = '{} -fPIC -DVERSION_INFO=\\ "{}\\ "' .format (
Original file line number Diff line number Diff line change @@ -168,11 +168,11 @@ class GZip {
168
168
169
169
void SetOutput (void *to, std::size_t amount) {
170
170
stream_.next_out = static_cast <Bytef*>(to);
171
- stream_.avail_out = std::min<std::size_t >(std::numeric_limits<uInt>::max (), amount);
171
+ stream_.avail_out = std::min<std::size_t >(( std::numeric_limits<uInt>::max) (), amount);
172
172
}
173
173
174
174
void SetInput (const void *base, std::size_t amount) {
175
- assert (amount < static_cast <std::size_t >(std::numeric_limits<uInt>::max ()));
175
+ assert (amount < static_cast <std::size_t >(( std::numeric_limits<uInt>::max) ()));
176
176
stream_.next_in = const_cast <Bytef*>(static_cast <const Bytef*>(base));
177
177
stream_.avail_in = amount;
178
178
}
@@ -225,7 +225,7 @@ class BZip {
225
225
226
226
void SetOutput (void *base, std::size_t amount) {
227
227
stream_.next_out = static_cast <char *>(base);
228
- stream_.avail_out = std::min<std::size_t >(std::numeric_limits<unsigned int >::max (), amount);
228
+ stream_.avail_out = std::min<std::size_t >(( std::numeric_limits<unsigned int >::max) (), amount);
229
229
}
230
230
231
231
void SetInput (const void *base, std::size_t amount) {
You can’t perform that action at this time.
0 commit comments