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>
Remove the existing installation of Homebrew for tests with MacPorts.
Allow also to run the CI on demand manually.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
CMakeLists.txt uses TREE (supported since cmake 3.8) and
check_ipo_supported (supported since cmake 3.9).
Require 3.10 which is provided by Ubuntu bionic and newer distributions.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
If no PKG_CONFIG_PATH was provided by the user, it is now set
automatically on hosts which have the `brew` command.
MacOS with Homebrew needs PKG_CONFIG_PATH to find icu4c and libarchive.
Signed-off-by: Stefan Weil <stweil@notebook11.fritz.box>