Building the C++ unit tests failed for
tests/src/Mod/Sketcher/App/SketchObject.cpp
because some XML headers were not found. This was because the XercesC
include dir was not in the search list for headers.
Details:
> In file included from /Users/jonas/src/FreeCAD/FreeCAD-git/tests/src/Mod/Sketcher/App/SketchObject.cpp:7:
> In file included from /Users/jonas/src/FreeCAD/FreeCAD-git/src/App/Application.h:33:
> /Users/jonas/src/FreeCAD/FreeCAD-git/src/Base/Parameter.h:55:10: fatal error: 'xercesc/util/XercesDefs.hpp' file not found
> #include <xercesc/util/XercesDefs.hpp>
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is the same issue as already adresses previously with PR9657 [1] but
the test for SketchObject was added later [2].
[1]: https://github.com/FreeCAD/FreeCAD/pull/9657
[2]: 03bb503283
The recent migration from boost::bind to std::bind [1] broke the build
on Mac (Apple clang version 13.0.0 (clang-1300.0.29.30) on macOS-11.7.8).
In all other cases the `boost::bind` was replaced by `std::bind` (among
with the place holders) but in these two spread sheet files
src/Mod/Spreadsheet/Gui/SheetModel.cpp
src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp
the original code only referenced `bind`, which used to get resolved to
`boost::bind` but now raises this error:
> /Users/jonas/src/FreeCAD/FreeCAD-git/src/Mod/Spreadsheet/Gui/SheetModel.cpp:50:36: error: use of undeclared identifier 'bind'; did you mean 'boost::bind'?
> sheet->cellUpdated.connect(bind(&SheetModel::cellUpdated, this, sp::_1));
> ^~~~
> boost::bind
This commit changes this to `std::bind` expicitly, just like it's done in
the other files. This works on my system/compiler.
[1]: 4ffe0c3218
It's not recommended any more to keep the export macro in the PreCompiled.h because many IDEs fail to fetch the export macro and raise a parsing error instead.