Fix linker error with disabled legacy engine (issue #2532)

Commit 3871caae86 introduced a build
regression when the legacy engine was disabled.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-07-04 13:45:52 +02:00
parent c11110992b
commit fd001c3ab9
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,10 @@ AM_CPPFLAGS += \
-I$(top_srcdir)/src/opencl
AM_CPPFLAGS += $(OPENCL_CPPFLAGS)
if DISABLED_LEGACY_ENGINE
AM_CPPFLAGS += -DDISABLED_LEGACY_ENGINE
endif
if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \
-fvisibility=hidden -fvisibility-inlines-hidden

View File

@ -469,6 +469,7 @@ bool BlamerBundle::GuidedSegsearchNeeded(const WERD_CHOICE *best_choice) const {
!ChoiceIsCorrect(best_choice);
}
#if !defined(DISABLED_LEGACY_ENGINE)
// Setup ready to guide the segmentation search to the correct segmentation.
void BlamerBundle::InitForSegSearch(const WERD_CHOICE* best_choice,
MATRIX* ratings, UNICHAR_ID wildcard_id,
@ -501,6 +502,8 @@ void BlamerBundle::InitForSegSearch(const WERD_CHOICE* best_choice,
}
} // end for blamer_bundle->correct_segmentation_cols/rows
}
#endif // !defined(DISABLED_LEGACY_ENGINE)
// Returns true if the guided segsearch is in progress.
bool BlamerBundle::GuidedSegsearchStillGoing() const {
return segsearch_is_looking_for_blame_;