Skip to content

Commit

Permalink
Fix build of "tests" on macOS
Browse files Browse the repository at this point in the history
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]: FreeCAD#9657
[2]: FreeCAD@532b391
  • Loading branch information
jbaehr authored and chennes committed Aug 11, 2023
1 parent e3de4f2 commit 321c448
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ target_include_directories(Sketcher_tests_run PUBLIC
${EIGEN3_INCLUDE_DIR}
${OCC_INCLUDE_DIR}
${Python3_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
)
target_link_libraries(Sketcher_tests_run
gtest_main
Expand Down

0 comments on commit 321c448

Please sign in to comment.