diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-09-22 02:11:59 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-09-22 02:11:59 +0400 |
commit | 0cddf8a58b8b48f9f8f0875b0b8b9741212e0fbf (patch) | |
tree | e73688db3a16f7ce4698395b483e37d36dff33a1 /phrase-extract | |
parent | 097735469e77fa7b509d96b4116b5f2408e22b59 (diff) |
Fix compilation without threads
Diffstat (limited to 'phrase-extract')
-rw-r--r-- | phrase-extract/extract-rules.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phrase-extract/extract-rules.cpp b/phrase-extract/extract-rules.cpp index 52a141917..5c308fd9b 100644 --- a/phrase-extract/extract-rules.cpp +++ b/phrase-extract/extract-rules.cpp @@ -268,7 +268,12 @@ int main(int argc, char* argv[]) } else if (strcmp(argv[i],"-threads") == 0 || strcmp(argv[i],"--threads") == 0 || strcmp(argv[i],"--Threads") == 0) { +#ifdef WITH_THREADS thread_count = atoi(argv[++i]); +#else + cerr << "thread support not compiled in." << '\n'; + exit(1); +#endif } else if (strcmp(argv[i], "--SentenceOffset") == 0) { if (i+1 >= argc || argv[i+1][0] < '0' || argv[i+1][0] > '9') { cerr << "extract: syntax error, used switch --SentenceOffset without a number" << endl; |