Remove macro USE_STD_NAMESPACE (#1360)

The related code in training/util.h now uses the GOOGLE_TESSERACT macro
to enable Google specific code to disable heap checking.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2018-03-04 14:43:28 +01:00 committed by zdenop
parent 0d9cdbe6dd
commit 7972b13e3a
16 changed files with 17 additions and 22 deletions

View File

@ -131,7 +131,6 @@ include(SourceGroups)
add_definitions(-DHAVE_CONFIG_H)
add_definitions(-D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1)
add_definitions(-DUSE_STD_NAMESPACE=1)
add_definitions(-DWINDLLNAME="libtesseract${VERSION_MAJOR}${VERSION_MINOR}.dll")
include_directories(${Leptonica_INCLUDE_DIRS})

View File

@ -1,5 +1,4 @@
AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\"\
-DUSE_STD_NAMESPACE \
-I$(top_srcdir)/arch -I$(top_srcdir)/lstm \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
-I$(top_srcdir)/viewer \

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS += -I$(top_srcdir)/ccstruct -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
AM_CPPFLAGS += -I$(top_srcdir)/ccstruct -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS =
AM_CXXFLAGS =

View File

@ -1,5 +1,4 @@
AM_CPPFLAGS += \
-DUSE_STD_NAMESPACE \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
-I$(top_srcdir)/arch -I$(top_srcdir)/lstm \
-I$(top_srcdir)/viewer \

View File

@ -2,7 +2,7 @@ AM_CPPFLAGS += \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/cutil \
-I$(top_srcdir)/viewer \
-I$(top_srcdir)/opencl
AM_CPPFLAGS += $(OPENCL_CPPFLAGS) -DUSE_STD_NAMESPACE
AM_CPPFLAGS += $(OPENCL_CPPFLAGS)
if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \

View File

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS =
AM_CXXFLAGS =
AM_CPPFLAGS = -DUSE_STD_NAMESPACE
AM_CPPFLAGS =
if !NO_TESSDATA_PREFIX
AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/

View File

@ -1,7 +1,7 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/dict \
-I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
-I$(top_srcdir)/viewer
if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \

View File

@ -148,7 +148,6 @@ projects:
public:
- HAVE_CONFIG_H
- _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1
- USE_STD_NAMESPACE=1
- WINDLLNAME="tesseract"
shared:
definitions:

View File

@ -1,4 +1,4 @@
AM_CPPFLAGS += -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
AM_CPPFLAGS += -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer
if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \

View File

@ -1,5 +1,5 @@
AM_CPPFLAGS += -I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/viewer
if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \

View File

@ -1,7 +1,7 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/cutil -I$(top_srcdir)/ccstruct \
-I$(top_srcdir)/arch -I$(top_srcdir)/viewer -I$(top_srcdir)/classify \
-I$(top_srcdir)/dict -I$(top_srcdir)/lstm -DUSE_STD_NAMESPACE
-I$(top_srcdir)/dict -I$(top_srcdir)/lstm
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS =
AM_CXXFLAGS = $(OPENMP_CXXFLAGS)
@ -16,10 +16,10 @@ AM_CPPFLAGS += -DTESS_EXPORTS
endif
include_HEADERS = \
convolve.h ctc.h fullyconnected.h functions.h input.h \
convolve.h ctc.h fullyconnected.h functions.h input.h \
lstm.h lstmrecognizer.h lstmtrainer.h maxpool.h \
networkbuilder.h network.h networkio.h networkscratch.h \
parallel.h plumbing.h recodebeam.h reconfig.h reversed.h \
parallel.h plumbing.h recodebeam.h reconfig.h reversed.h \
series.h static_shape.h stridemap.h tfnetwork.h weightmatrix.h
noinst_HEADERS =
@ -27,8 +27,8 @@ noinst_HEADERS =
noinst_LTLIBRARIES = libtesseract_lstm.la
libtesseract_lstm_la_SOURCES = \
convolve.cpp ctc.cpp fullyconnected.cpp functions.cpp input.cpp \
convolve.cpp ctc.cpp fullyconnected.cpp functions.cpp input.cpp \
lstm.cpp lstmrecognizer.cpp lstmtrainer.cpp maxpool.cpp \
networkbuilder.cpp network.cpp networkio.cpp \
parallel.cpp plumbing.cpp recodebeam.cpp reconfig.cpp reversed.cpp \
parallel.cpp plumbing.cpp recodebeam.cpp reconfig.cpp reversed.cpp \
series.cpp stridemap.cpp tfnetwork.cpp weightmatrix.cpp

View File

@ -1,5 +1,4 @@
AM_CPPFLAGS += \
-DUSE_STD_NAMESPACE \
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/ccutil \
-I$(top_srcdir)/viewer \
-I$(top_srcdir)/ccmain -I$(top_srcdir)/wordrec -I$(top_srcdir)/api \

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS += \
-DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE\
-DPANGO_ENABLE_ENGINE \
-I$(top_srcdir)/ccmain -I$(top_srcdir)/api \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
-I$(top_srcdir)/lstm -I$(top_srcdir)/arch \

View File

@ -55,7 +55,7 @@ struct StringHash : public stdext::hash_compare <std::string> {
};
#endif // !COMPILER_MSVC
#ifndef USE_STD_NAMESPACE
#ifdef GOOGLE_TESSERACT
#include "base/heap-checker.h"
#define DISABLE_HEAP_LEAK_CHECK HeapLeakChecker::Disabler disabler
#else

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS += -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE
AM_CPPFLAGS += -DPANGO_ENABLE_ENGINE
AM_CPPFLAGS += -I$(top_srcdir)/api
AM_CPPFLAGS += -I$(top_srcdir)/arch
AM_CPPFLAGS += -I$(top_srcdir)/ccmain
@ -14,7 +14,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/lstm
AM_CPPFLAGS += -I$(top_srcdir)/textord
AM_CPPFLAGS += -I$(top_srcdir)/viewer
AM_CPPFLAGS += -I$(top_srcdir)/wordrec
# Build googletest:
check_LTLIBRARIES = libgtest.la libgtest_main.la
libgtest_la_SOURCES = ../googletest/googletest/src/gtest-all.cc
@ -36,7 +36,7 @@ check_PROGRAMS = \
TESTS = $(check_PROGRAMS)
#List of source files needed to build the executable:
apiexample_test_SOURCES = apiexample_test.cc
apiexample_test_LDFLAGS = $(OPENCL_LDFLAGS) $(LEPTONICA_LIBS)
apiexample_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS) $(LEPTONICA_LIBS)

View File

@ -2,7 +2,7 @@ AM_CPPFLAGS += \
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/ccutil \
-I$(top_srcdir)/cutil -I$(top_srcdir)/classify \
-I$(top_srcdir)/dict \
-I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
-I$(top_srcdir)/viewer
if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \