mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 12:49:35 +08:00
[sw] Bump minimal C++ standard to C++17.
This commit is contained in:
parent
c3e04abe1e
commit
b09fa9b166
16
sw.cpp
16
sw.cpp
@ -3,6 +3,8 @@ void build(Solution &s)
|
||||
auto &tess = s.addProject("google.tesseract", "master");
|
||||
tess += Git("https://github.com/tesseract-ocr/tesseract", "", "{v}");
|
||||
|
||||
auto cppstd = cpp17;
|
||||
|
||||
auto &libtesseract = tess.addTarget<LibraryTarget>("libtesseract");
|
||||
{
|
||||
libtesseract.setChecks("libtesseract");
|
||||
@ -10,7 +12,7 @@ void build(Solution &s)
|
||||
libtesseract.ExportAllSymbols = true;
|
||||
libtesseract.PackageDefinitions = true;
|
||||
|
||||
libtesseract += cpp14;
|
||||
libtesseract += cppstd;
|
||||
|
||||
libtesseract += "include/.*"_rr;
|
||||
libtesseract += "src/.*"_rr;
|
||||
@ -102,19 +104,19 @@ void build(Solution &s)
|
||||
|
||||
//
|
||||
auto &tesseract = tess.addExecutable("tesseract");
|
||||
tesseract += cpp14;
|
||||
tesseract += cppstd;
|
||||
tesseract += "src/api/tesseractmain.cpp";
|
||||
tesseract += libtesseract;
|
||||
|
||||
//
|
||||
auto &tessopt = tess.addStaticLibrary("tessopt");
|
||||
tessopt += cpp14;
|
||||
tessopt += cppstd;
|
||||
tessopt += "src/training/tessopt.*"_rr;
|
||||
tessopt.Public += libtesseract;
|
||||
|
||||
//
|
||||
auto &common_training = tess.addStaticLibrary("common_training");
|
||||
common_training += cpp14;
|
||||
common_training += cppstd;
|
||||
common_training +=
|
||||
"src/training/commandlineflags.cpp",
|
||||
"src/training/commandlineflags.h",
|
||||
@ -140,7 +142,7 @@ void build(Solution &s)
|
||||
|
||||
//
|
||||
auto &unicharset_training = tess.addStaticLibrary("unicharset_training");
|
||||
unicharset_training += cpp14;
|
||||
unicharset_training += cppstd;
|
||||
unicharset_training +=
|
||||
"src/training/fileio.*"_rr,
|
||||
"src/training/icuerrorcode.*"_rr,
|
||||
@ -157,7 +159,7 @@ void build(Solution &s)
|
||||
//
|
||||
#define ADD_EXE(n, ...) \
|
||||
auto &n = tess.addExecutable(#n); \
|
||||
n += cpp14; \
|
||||
n += cppstd; \
|
||||
n += "src/training/" #n ".*"_rr; \
|
||||
n.Public += __VA_ARGS__; \
|
||||
n
|
||||
@ -177,7 +179,7 @@ void build(Solution &s)
|
||||
ADD_EXE(set_unicharset_properties, unicharset_training);
|
||||
|
||||
ADD_EXE(text2image, unicharset_training);
|
||||
text2image += cpp14;
|
||||
text2image += cppstd;
|
||||
text2image +=
|
||||
"src/training/boxchar.cpp",
|
||||
"src/training/boxchar.h",
|
||||
|
Loading…
Reference in New Issue
Block a user