Skip to content

Commit

Permalink
Improve disabled legacy engine build
Browse files Browse the repository at this point in the history
  • Loading branch information
amitdo committed Oct 9, 2020
1 parent 4b6db07 commit f4744de
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion unittest/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ AM_CPPFLAGS += -isystem $(top_srcdir)/googletest/googletest/include \

check_PROGRAMS = apiexample_test
if ENABLE_TRAINING
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += applybox_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += baseapi_test
if TENSORFLOW
check_PROGRAMS += baseapi_thread_test
Expand All @@ -141,8 +143,8 @@ check_PROGRAMS += heap_test
check_PROGRAMS += imagedata_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += indexmapbidi_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += intfeaturemap_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += intsimdmatrix_test
check_PROGRAMS += lang_model_test
check_PROGRAMS += layout_test
Expand All @@ -155,7 +157,9 @@ check_PROGRAMS += lstm_test
check_PROGRAMS += lstmtrainer_test
endif # ENABLE_TRAINING
check_PROGRAMS += loadlang_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += mastertrainer_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += matrix_test
if TENSORFLOW
check_PROGRAMS += networkio_test
Expand All @@ -164,22 +168,28 @@ if ENABLE_TRAINING
check_PROGRAMS += normstrngs_test
endif # ENABLE_TRAINING
check_PROGRAMS += nthitem_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += osd_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += pagesegmode_test
if ENABLE_TRAINING
if TENSORFLOW
check_PROGRAMS += pango_font_info_test
endif # TENSORFLOW
endif # ENABLE_TRAINING
check_PROGRAMS += paragraphs_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += params_model_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += progress_test
check_PROGRAMS += qrsequence_test
check_PROGRAMS += recodebeam_test
check_PROGRAMS += rect_test
check_PROGRAMS += resultiterator_test
check_PROGRAMS += scanutils_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += shapetable_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += stats_test
if TENSORFLOW
check_PROGRAMS += stridemap_test
Expand Down Expand Up @@ -219,8 +229,10 @@ apiexample_test_SOURCES = apiexample_test.cc
apiexample_test_LDFLAGS = $(OPENCL_LDFLAGS) $(LEPTONICA_LIBS)
apiexample_test_LDADD = $(TESS_LIBS) $(LEPTONICA_LIBS)

if !DISABLED_LEGACY_ENGINE
applybox_test_SOURCES = applybox_test.cc
applybox_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
endif # !DISABLED_LEGACY_ENGINE

baseapi_test_SOURCES = baseapi_test.cc
baseapi_test_LDADD = $(ABSEIL_LIBS) $(TRAINING_LIBS) $(LEPTONICA_LIBS)
Expand All @@ -231,8 +243,10 @@ baseapi_thread_test_LDADD = $(ABSEIL_LIBS)
baseapi_thread_test_LDADD += $(TESS_LIBS) $(LEPTONICA_LIBS)
endif # TENSORFLOW

if !DISABLED_LEGACY_ENGINE
bitvector_test_SOURCES = bitvector_test.cc
bitvector_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE

cleanapi_test_SOURCES = cleanapi_test.cc
cleanapi_test_LDADD = $(TESS_LIBS)
Expand Down Expand Up @@ -263,11 +277,15 @@ heap_test_LDADD = $(TESS_LIBS)
imagedata_test_SOURCES = imagedata_test.cc
imagedata_test_LDADD = $(ABSEIL_LIBS) $(TRAINING_LIBS)

if !DISABLED_LEGACY_ENGINE
indexmapbidi_test_SOURCES = indexmapbidi_test.cc
indexmapbidi_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE

if !DISABLED_LEGACY_ENGINE
intfeaturemap_test_SOURCES = intfeaturemap_test.cc
intfeaturemap_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE

intsimdmatrix_test_SOURCES = intsimdmatrix_test.cc
intsimdmatrix_test_LDADD = $(TESS_LIBS)
Expand Down Expand Up @@ -309,8 +327,10 @@ lstm_test_LDADD = $(ABSEIL_LIBS) $(TRAINING_LIBS)
lstmtrainer_test_SOURCES = lstmtrainer_test.cc
lstmtrainer_test_LDADD = $(ABSEIL_LIBS) $(TRAINING_LIBS) $(LEPTONICA_LIBS)

if !DISABLED_LEGACY_ENGINE
mastertrainer_test_SOURCES = mastertrainer_test.cc
mastertrainer_test_LDADD = $(ABSEIL_LIBS) $(TRAINING_LIBS) $(LEPTONICA_LIBS)
endif # !DISABLED_LEGACY_ENGINE

matrix_test_SOURCES = matrix_test.cc
matrix_test_LDADD = $(TESS_LIBS)
Expand All @@ -329,8 +349,10 @@ normstrngs_test_LDADD = $(ABSEIL_LIBS) $(TRAINING_LIBS) $(ICU_I18N_LIBS) $(ICU_U
nthitem_test_SOURCES = nthitem_test.cc
nthitem_test_LDADD = $(TESS_LIBS)

if !DISABLED_LEGACY_ENGINE
osd_test_SOURCES = osd_test.cc
osd_test_LDADD = $(TESS_LIBS) $(LEPTONICA_LIBS)
endif # !DISABLED_LEGACY_ENGINE

pagesegmode_test_SOURCES = pagesegmode_test.cc
pagesegmode_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
Expand All @@ -348,8 +370,10 @@ endif # TENSORFLOW
paragraphs_test_SOURCES = paragraphs_test.cc
paragraphs_test_LDADD = $(ABSEIL_LIBS) $(TESS_LIBS)

if !DISABLED_LEGACY_ENGINE
params_model_test_SOURCES = params_model_test.cc
params_model_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE

progress_test_SOURCES = progress_test.cc
progress_test_LDFLAGS = $(OPENCL_LDFLAGS) $(LEPTONICA_LIBS)
Expand All @@ -371,8 +395,10 @@ resultiterator_test_LDADD += $(LEPTONICA_LIBS) $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
scanutils_test_SOURCES = scanutils_test.cc
scanutils_test_LDADD = $(TRAINING_LIBS)

if !DISABLED_LEGACY_ENGINE
shapetable_test_SOURCES = shapetable_test.cc
shapetable_test_LDADD = $(ABSEIL_LIBS) $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE

stats_test_SOURCES = stats_test.cc
stats_test_LDADD = $(TESS_LIBS)
Expand Down Expand Up @@ -439,7 +465,9 @@ if T_WIN
apiexample_test_LDADD += -lws2_32
intsimdmatrix_test_LDADD += -lws2_32
matrix_test_LDADD += -lws2_32
if !DISABLED_LEGACY_ENGINE
osd_test_LDADD += -lws2_32
endif # !DISABLED_LEGACY_ENGINE
loadlang_test_LDADD += -lws2_32
endif

Expand Down

0 comments on commit f4744de

Please sign in to comment.