On Windows with UCRT and a UTF-8 locale std::regex takes a lot of time
(several minutes!). Replacing it avoids that bottleneck.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Add CI for openmp performance comparison
* Update .github/workflows/autotools-openmp.yml
Co-authored-by: Stefan Weil <sw@weilnetz.de>
* Update autotools-openmp.yml
* Update autotools-openmp.yml
Add linefeed
Co-authored-by: Stefan Weil <sw@weilnetz.de>
The old code failed with an error message when running in a
git working directory without any tag (for example after
git clone --depth 1).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
MSYS2 clang64 uses the lld linker which does not support --as-needed.
The normal GNU ld uses that linker option with ELF targets but ignores
it for PE targets (.exe, .dll), so it can be removed.
Remove also the -Wl, which is only needed when linker options are
passed to the compiler but not when they are directly passed to the
linker.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Changing from class to struct causes clang compiler warnings like this one:
In file included from ../../../src/api/baseapi.cpp:63:
../../../include/tesseract/osdetect.h:29:1: warning: class 'BLOB_CHOICE_LIST' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
class BLOB_CHOICE_LIST;
^
../../../src/ccstruct/ratngs.h:228:1: note: previous use is here
ELISTIZEH(BLOB_CHOICE)
^
../../../src/ccutil/elst.h:804:10: note: expanded from macro 'ELISTIZEH'
struct CLASSNAME##_LIST : X_LIST<ELIST, ELIST_ITERATOR, CLASSNAME> { \
^
<scratch space>:458:1: note: expanded from here
BLOB_CHOICE_LIST
^
../../../include/tesseract/osdetect.h:29:1: note: did you mean struct here?
class BLOB_CHOICE_LIST;
^~~~~
As it is not possible to change the API header tesseract/osdetect.h,
some of the changes from class to struct had to be reverted.
Fixes: 968d653f89 ("Shorten macros")
Signed-off-by: Stefan Weil <sw@weilnetz.de>