Compare commits

..

426 Commits

Author SHA1 Message Date
Chris Hennes 930dd9a762 Addon Manager: Fix bug in updater 2022-12-06 20:35:37 -06:00
Uwe fc12f15ee4 [Win installer] some uninstaller improvements
- remove two registry path deletions that were never performed since the paths do not exist
- remove registry key that stores the main window parameters (size and position) when the option to remove also the user settings is on (because this affects all FreeCAD installations)
- also change a name to uppercase (does not matter but Win 10 uses uppercase, so we should do the same to avoid confusions)
2022-12-05 02:06:46 +01:00
Uwe aaee1b5e39 this is FreeCAD 0.20.2 2022-12-05 00:02:59 +01:00
Uwe 4fef2ad448 [Win installer] improve file deletion script 2022-12-05 00:00:58 +01:00
Uwe 726ddc71f9 [Win installer] prepare for FC 0.20.2 2022-12-04 23:33:45 +01:00
Uwe 9415d2d0c4 [PD] Pad/pocket: fix wrong error message
- the error can also occur when the mode it not UpToFace (ToFirst or ToLast)
- also add note when Reversed checkbox is enabled since this is no obvious (as discussed in the forum)
- also some whitespace unification and include sorting
2022-12-04 05:38:49 +01:00
Uwe bbfe3aedce [PD] FeatureSketchBased: fix orthogonal check
- same fix as #7879
- also fix wording on an error message and improve a variable name
2022-12-04 05:33:40 +01:00
Roy-043 524bda9547 Arch: Fix missing Windows in Arch Reference of BuildingPart 2022-12-02 00:52:10 +01:00
Roy-043 ac182bf9d9 Arch: Fix Arch_Space text position 2022-12-01 12:35:19 +01:00
Roy-043 05789429cf Arch: fix cutplane color (#7859)
* Arch: fix cutplane color

* Update ArchCutPlane.py
2022-11-30 08:53:52 +01:00
Yorik van Havre 15482dcad6 Merge pull request #7885 from Roy-043/Draft-fix-clone-DiffuseColor
Draft: fix clone DiffuseColor
2022-11-30 08:51:53 +01:00
Yorik van Havre effe30ba69 Start: Set minimum height for notes panel 2022-11-30 01:24:14 +01:00
wandererfan 1bcb7275db [TD]backport fix for no Detail without BaseView 2022-11-29 02:17:14 +01:00
Chris Hennes 9bf0c5890f Addon Manager: Fix bad formatting in error handler 2022-11-27 19:41:17 -06:00
flachyjoe d17c9e35d5 [Spreadsheet] Fix alias setting for empty cells
Fix #7841
2022-11-27 19:36:42 -06:00
wmayer 2605b54d89 Sketch: use the focal distance to determine a correct scale factor for SoDatumLabel
This fixes #7860: Dimensions get unreadable (small) if a 2nd sketch is visible
and fixes #7082: Dimension size on perspective view scales "backwards"
2022-11-24 10:25:10 +01:00
Uwe 1621bd0deb [skip ci] [Part] TopoShapePyImp: fix formatting mistake
- introduced with c29228d7
2022-11-22 03:26:20 +01:00
Uwe fd6c8382ee [Part] manually backport PR #7824 2022-11-22 03:19:49 +01:00
Uwe f177aa6467 [skip ci] .clang-format: shorthand loops
- disallow as we did before we had this format file
2022-11-22 03:13:55 +01:00
Uwe c29228d785 [Part] manually backport 09dccb70 2022-11-22 03:08:25 +01:00
Yorik van Havre eec4a5975c Merge pull request #7821 from Roy-043/Draft-fix-arcFromSpline
Draft: fix arcFromSpline midpoint bug
2022-11-21 14:59:57 +01:00
Uwe 10902d7d4f Revert "Gui: ActionGroup also get its tooltip title updated"
This reverts commit fcaa312616.
2022-11-21 12:34:08 +01:00
0penBrain fcaa312616 Gui: ActionGroup also get its tooltip title updated 2022-11-21 04:09:58 +01:00
0penBrain a713eafc95 Gui: ActionGroup also get its tooltip title updated 2022-11-21 04:07:57 +01:00
Rexbas acc94f3baf Gui: Stop Revit rotation and zoom on scroll release
- Stops the rotation when scroll is released but SHIFT is still pressed
- Stops zooming when scroll is released but CTRL is still pressed
2022-11-21 04:02:58 +01:00
wmayer 710a470706 App: fix endless-loop in DocumentObject::getParents 2022-11-20 12:27:38 +01:00
wmayer 087cdd8169 Gui: fix endless-loop in View3DInventorSelection::checkGroupOnTop 2022-11-20 12:09:06 +01:00
Bernd Hahnebach fd544b4ba9 FEM: gmsh binary location on osx, add comment 2022-11-20 01:24:08 +01:00
Bernd Hahnebach 887fac2ab1 FEM: add standard path for gmsh on osx 2022-11-20 01:24:08 +01:00
wmayer 5223aff0fb Base: [skip ci] fix readability-identifier-length 2022-11-20 01:20:58 +01:00
luz paz 757af860be [Sketcher] fix header uniformity
Make uniform all Sketcher headers.
2022-11-20 01:19:31 +01:00
luz paz feec92c94a [Arch] fix header uniformity
Make uniforum all Arch headers
2022-11-20 01:17:03 +01:00
wmayer c5723f1f89 Arch: replace tabs with spaces 2022-11-20 01:15:45 +01:00
0penBrain 3e0bd9e34a [Typo]Sketcher: 'Clone' is the first command of CompCopy, match the tooltip 2022-11-20 01:03:39 +01:00
wmayer af4c8ffa82 App: fix memory leak and consistently use Py::asObject() in DocumentObserverPython 2022-11-20 00:58:52 +01:00
wmayer 866e20543d clang-tidy: disable 'readability-redundant-access-specifiers' because clang-tidy fails to distinguish between 'public' vs. 'public Q_SLOTS' 2022-11-20 00:55:38 +01:00
wmayer 7d9b3445a7 App: [skip ci] fix memory leak (copied from master) 2022-11-14 19:51:29 +01:00
vernzimm c63cb3d9dc Gui: Add default JPEG save quality (#7737)
* Update SoFCOffscreenRenderer.cpp

Set jpg screenshot capture to 100% quality vs qimage defaulting to -1

* Add default quality to JPG export

Fixed original version and use quality 90% as compromise between file size and fidelity.
2022-11-11 22:50:43 +01:00
Uwe ae653d1d5c backport .clang-format file from master 2022-11-11 05:19:58 +01:00
wmayer 3e981e0712 PD: fix crash in TaskRevolutionParameters::addAxisToCombo
and some warnings reported by GH actions
2022-11-10 14:10:32 +01:00
wmayer c849e9970e PD: [skip ci] improve the exception text 2022-11-10 14:10:32 +01:00
Uwe 31fe74b3a7 [PD] TaskDlgRevolutionParameters: fix some CI warnings
- reported here: https://github.com/FreeCAD/FreeCAD/pull/7667/commits/f0a0e563
- and here: https://github.com/FreeCAD/FreeCAD/pull/7719/commits/8f3f17f8
2022-11-10 14:10:32 +01:00
luz paz 56d29f212b Arch: remove trailing whitespace in importWebGL.py 2022-11-10 14:09:19 +01:00
wmayer 6f302d33fe Gui: backport class WrapperManager to fix possible crashes when using PySide 2022-11-10 09:32:25 +01:00
Roy-043 7d457f189d Draft: test_modification.py: modified test and added test (#7741)
The old test_offset_closed function was renamed to test_offset_rectangle_with_face.
It is now also a regression test for: #7670

The added test_offset_closed_with_reversed_edge function is a regression test for: #5496
2022-11-09 13:33:29 +01:00
Yorik van Havre b601ed911c Merge pull request #7670 from Roy-043/Draft-Fix-rectangle-with-face-offset-bug
Draft: Fix rectangle with face offset bug
2022-11-09 13:32:06 +01:00
Uwe 3aac13eacf Revert "Gui: fix possible crash when running the garbage collector after creating a shiboken wrapper"
This reverts commit a06533392b.
2022-11-09 13:23:47 +01:00
Uwe c8042bed16 Revert "Gui: [skip ci] fix build failure if shiboken support is disabled"
This reverts commit d60a737ae8.
2022-11-09 13:23:37 +01:00
wmayer d60a737ae8 Gui: [skip ci] fix build failure if shiboken support is disabled 2022-11-09 13:05:16 +01:00
wmayer a06533392b Gui: fix possible crash when running the garbage collector after creating a shiboken wrapper 2022-11-09 13:03:32 +01:00
Uwe 3569b135bb [Gui] CommandWindow.cpp: manually backport a change to fix compilation 2022-11-09 03:09:40 +01:00
Chris Hennes d1ad3b4926 Addon Manager: Add try/except to integer conversion 2022-11-08 10:30:38 -06:00
Uwe 59177020a6 Revert "Part: TestPartApp.py add tolerance to PartTestShapeRotate"
This reverts commit 31b3358291.
2022-11-07 02:31:17 +01:00
wmayer f238295c2d PD: unit test to check offset of sub-shape binder (PR #7445) 2022-11-06 14:15:56 +01:00
wmayer 68ac5c1c8c Gui: [skip ci] fix possible crash in FilterStatusBar::eventFilter() 2022-11-06 14:07:34 +01:00
wmayer 9647ac5fdd Gui: handle std::exception and Base::Exception inside DlgPreferencesImp::createPageInGroup to avoid that the preferences dialog won't be shown at all 2022-11-06 14:05:01 +01:00
wmayer a36c87c71d PD: use Base::StateLocker to simplify handling of blockUpdate and make it exception-safe 2022-11-06 14:03:01 +01:00
wmayer 9a053b860d PD: fixes #7629: Keep sketch visible during revolution tasks 2022-11-06 14:01:17 +01:00
Roy-043 31b3358291 Part: TestPartApp.py add tolerance to PartTestShapeRotate 2022-11-06 13:59:24 +01:00
Roy-043 459790624f Part: Fix typo in regression_tests.py 2022-11-06 13:58:18 +01:00
Uwe 664bc12c9a [PD] Helix: assure source Sketch is visible when in selection mode
- same as https://github.com/FreeCAD/FreeCAD/commit/18781bcf6 but for Helices (fixes #7629 also for helices)
- also modernize Qt connection
2022-11-06 13:51:03 +01:00
Uwe bc3a3d3c8c [Gui] SplashScreen: modernize Qt connection
- was reported as warning by our CI
2022-11-06 13:49:34 +01:00
Chris Hennes 83f4b2c293 Addon Manager: Catch unicode decode failures 2022-11-05 09:44:43 -05:00
Flachy Joe 0bd3f9d8a9 [PartDesign] Improve Helix calculation for straight shape (#7674) 2022-11-04 13:32:58 +01:00
wmayer a22a8a00a1 PD: [skip ci] disable undo/redo for the tmp. document created by the SubShapeBinder 2022-10-27 14:35:47 +02:00
wmayer 1833ae86de Gui: if an expression is set for Euler angles in the placement dialog then evaluate the expression instead of determining the angles from the rotation
See forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=72522
2022-10-26 18:18:33 +02:00
Yorik van Havre 75c515691d Merge pull request #7616 from Roy-043/Draft-Make-Std_TransformManip-work-for-Draft_Point
Draft: Make Std_TransformManip work for Draft_Point
2022-10-26 18:17:40 +02:00
luz paz 4b191ff830 Spreadsheet: [skip ci] fix doxygen typo 2022-10-26 02:50:30 +02:00
wmayer dd35d0d035 App: fixes issue #7628: Crash after creating Sketch for Body
The problem is that inside Transaction::addObjectNew() a transaction object is deleted before removing it from the container. When deleting the corresponding transactional object (i.e. a DocumentObject or ViewProvider)
it can happen that it e.g. calls Transaction::addOrRemoveProperty() that now finds the dangling pointer in the container.

The safe way is to first remove the object from the container before deleting it.
2022-10-25 03:10:45 +02:00
wmayer d66b34050d Gui: cppcoreguidelines-pro-type-reinterpret-cast
Replace an unsafe reinterpret_cast with the safer static_cast
2022-10-25 01:18:54 +02:00
Roy-043 641fd1b287 Sketcher: Correct icon for Sketcher_CreatePointFillet 2022-10-25 01:15:01 +02:00
wmayer 3f48031cb4 CMake: [skip ci] fix deprecation warning about policy CMP0072 2022-10-25 01:14:27 +02:00
Uwe 142e796244 [skip CI] [FEM] equation.py: fix a tooltip
- the highest priority is computed first, the Wiki page is already correct
2022-10-25 01:13:22 +02:00
Bernd Hahnebach 9c5ff9164e FEM: get LGTM silent 2022-10-25 01:12:29 +02:00
luz paz 92b8d8a690 Fix source comment typo 2022-10-25 01:11:09 +02:00
Stefan Klug 293856b705 PartDesign: Remove duplicate comment 2022-10-25 01:10:33 +02:00
Stefan Klug 326ec081ce [Bugfix] PartDesign: Fix HoleCutDepth not being recalculated correctly
HoleCutDepth is reset to 0 to force a recalculation of te depth when
HoleCutType is set to a new value.
But the line
	pcHole->HoleCutCustomValues.setValue(false)
also forces a recalculation. So the depth was recalculated with the old
value in HoleCutType which was not expected behaviour.
2022-10-23 04:11:17 +02:00
0penBrain cf6e561e5a [Bugfix]Spreadsheet: fix multi-screen management of QtColorPicker
+ set parent when instantiating
2022-10-21 09:31:55 -05:00
wmayer f7f717db9e fix build failure 2022-10-16 11:46:48 +02:00
wmayer 1f08f07d38 Gui: depending on parameter settings open a transaction when changing visibility or selectability 2022-10-15 21:39:56 +02:00
wmayer b7f66680ab App: fixes #7277: Write to network drive fails on Windows 2022-10-14 02:26:50 +02:00
Roy-043 3473e5d424 Draft: Fix alignment of angular dimension arrows in svg.py 2022-10-14 01:49:18 +02:00
Yorik van Havre 00a8a784ec Merge pull request #7591 from Roy-043/Arch-Improve-handling-of-window-hosts
Arch: Improve handling of window hosts
2022-10-14 01:46:08 +02:00
Ajinkya Dahale 8443756ff5 [Sketcher] [planegcs] Add references for equations
Some equations were mentioned by just the number without telling the resource they were from. The book was found couple years ago but not mentioned here.
2022-10-14 01:45:28 +02:00
Yorik van Havre 35a61883e1 Merge pull request #7576 from Roy-043/releases/FreeCAD-0-20
Draft+Arch: Fix crash related to SoBrepEdgeSet
2022-10-11 14:22:34 +02:00
Roy-043 1fc9b07a2e Draft+Arch: Fix crash related to SoBrepEdgeSet 2022-10-07 21:16:11 +02:00
wandererfan a4f29eb509 [TD]encode Xml characters in spreadsheet 2022-10-06 03:02:39 +02:00
Uwe 570aac5399 [FEM] ViewProviderFemConstrain*: remove unused includes - part 2/2
- also sort includes
- also fix warnings about too long lines
2022-10-04 00:08:45 +02:00
Uwe cb8926155c [FEM] ViewProviderFemConstrain*: remove unused includes - part 1
- also sort includes
- also fix warnings about too long lines
2022-10-04 00:08:45 +02:00
Uwe c8f0338ae1 [FEM] ViewProviderFem*: remove unused includes
- also sort includes
2022-10-04 00:08:00 +02:00
Uwe 20a19b3245 [FEM] ViewProvider*: remove unused includes
- also sort includes
2022-10-04 00:06:14 +02:00
looooo 07900daa07 add_definitions(-DSALOME_USE_64BIT_IDS) for smesh via config 2022-10-03 23:11:21 +02:00
Uwe ae0ff4f405 [FEM] TaskFemConstrain*: remove unused includes
- also sort includes
2022-10-03 05:42:41 +02:00
Uwe 8f2e08758d [FEM] TaskPostBoxes.cpp: re-add an include
- (strange that it compiled on MSVC without even a warning)
2022-10-03 05:42:41 +02:00
Uwe a9d1b557ed [FEM] Task*: remove unused includes
- also sort includes
2022-10-03 05:42:41 +02:00
Uwe e81a31f638 [FEM] Dlg* etc.: remove unused includes
- also sort includes
2022-10-03 05:42:41 +02:00
Uwe a01202aaa7 [FEM] FemResult* to end: remove unused includes
- also sort includes
2022-10-03 05:42:40 +02:00
Uwe 81b94827ee [FEM] FemPost*: remove unused includes
- also sort includes
2022-10-03 05:42:12 +02:00
Uwe d8bc205b75 [FEM] FemMesh*: remove unused includes
- also sort includes
2022-10-03 05:42:12 +02:00
Uwe 77b5fd9a5d [skip CI] [Part] TaskFaceColors.cpp: whitespace 2022-10-03 05:25:31 +02:00
Uwe d64ba16bbf [Part] Task*: remove unused includes - part 2/2
- also some sorting
2022-10-03 05:25:31 +02:00
Uwe c6b3d2f688 [Part] Task*: remove unused includes - part 1
- also some sorting
2022-10-03 05:24:51 +02:00
Uwe 344f88cb05 [Part] So*: remove unused includes
- also some sorting
2022-10-03 05:23:08 +02:00
Uwe 1e2806095c [Part] Dlg*: remove unused includes - part 2/2
- also some sorting
2022-10-03 05:23:08 +02:00
Uwe 2db76146a7 [Part] Dlg*: remove unused includes - part 1
- also some sorting
2022-10-03 05:22:49 +02:00
Uwe 6b3fefa166 [FEM] App, FemConstraint*: remove unused includes - part 2/2
- also sort includes
2022-10-03 00:13:15 +02:00
Uwe f7111e00a4 [FEM] App, FemConstraint*: remove unused includes - part 1
- also sort includes
2022-10-03 00:13:15 +02:00
Stanislav 8fc35c5981 i18n: Manually update language files from Crowdin (#7540)
* Manual update from Crowdin
2022-10-02 18:21:46 +02:00
0penBrain 987ec6d705 [Bugfix]Gui: TinkerCAD mouse mode was always stopping RMB propagation 2022-10-01 04:39:22 +02:00
fandaL 1d80800838 FEM:fix remaining result object in memory in femmesh2mesh 2022-10-01 04:34:53 +02:00
wmayer d8d521150d Gui: change Selection.getCompleteSelection() to return a list of SelectionObject instead of DocumentObject (see 10e9e3b9b5) 2022-09-30 14:56:40 +02:00
0penBrain 766f787d84 Sketcher: fix misleading indentation 2022-09-24 16:06:24 +02:00
0penBrain e13e09b888 [Bugfix]Sketcher/Point-on-object: do not substitute constraint if conditions are not OK 2022-09-24 16:06:24 +02:00
Yorik van Havre a52eb0d4b9 Merge pull request #7359 from Roy-043/Draft-Improve-In-Command-shortcut-Undo-implementation
Draft: Improve In-Command-shortcut Undo implementation
2022-09-24 05:17:20 +02:00
marioalexis 8458569bda Gui: Allow None parameter again in drag and drop methods in Python ViewProviderPy class 2022-09-24 05:12:08 +02:00
wmayer 6e187c3b0e Spreadsheet: Handle language change event for context-menu 2022-09-19 02:41:55 +02:00
Uwe de8de44276 Revert "[PD] sync wedge code to master"
This reverts commit a019468c4a.
2022-09-19 02:17:46 +02:00
Uwe a019468c4a [PD] sync wedge code to master 2022-09-18 12:33:14 +02:00
Ethan Chappel 9b20f21792 Gui: Add format parameter for wedgeXmin 2022-09-18 12:08:23 +02:00
0penBrain dcb8738f55 Gui: when customizing shortcuts, warn user if command isn't in use with message box 2022-09-15 13:22:14 +02:00
Uwe 5c0cc8dc8a [Sketcher] rename a variable to please spellchecker
- also some code style improvements
2022-09-14 10:25:58 +02:00
Ajinkya Dahale 46cd5a3809 [Sketcher] Fix Typo in comment
threated -> treated
2022-09-14 09:17:35 +02:00
0penBrain bc5c7f80df [Bugfix]Sketcher: prevent dangling state of Shift key if key released out of Quarter 2022-09-14 09:13:41 +02:00
Roy-043 914520becb Draft: Fix flatten wire 2022-09-14 01:33:45 +02:00
Roy-043 ecce035d2d Draft: Fix alignment of angular dimension arrows 2022-09-13 02:36:23 +02:00
Roy-043 a00912ba77 Arch: Fix baseface generation for walls with a trace that self-intersects, has T-connections or that overlaps 2022-09-13 02:31:39 +02:00
Yorik van Havre 18952f7a4b Merge pull request #7354 from Roy-043/Draft-add-tolerance-to-boundbox-check-in-intersections.py
Draft: add tolerance to BoundBox check in intersections.py
2022-09-13 02:04:12 +02:00
Uwe c47bbd0cfe Revert "Mod: [skip ci] fix some MSVC warnings"
This reverts commit 0d5ec23d1f.
2022-09-12 03:34:42 +02:00
Markus Lampert 9364930948 Fixed handling of App::PropertyPercent in SetupSheet save/load 2022-09-12 03:08:23 +02:00
sliptonic 71d47a137d Merge pull request #7454 from sliptonic/PathFeedRateBug
Fix bug when testing verticallity during PathFeedRate generation
2022-09-12 03:06:39 +02:00
VM4Dim de1abd6719 [StartPage] Fix Wiki Link to Reverse_Engineering WB Page 2022-09-12 03:03:28 +02:00
wmayer 0d5ec23d1f Mod: [skip ci] fix some MSVC warnings 2022-09-12 03:01:20 +02:00
wmayer 506dc005f4 Mesh: [skip ci] add missing headers to PCH 2022-09-12 03:00:40 +02:00
0penBrain 754d82428f [Bugfix]Gui: ensure message boxes appear and stay on top of main window 2022-09-12 02:55:59 +02:00
Roy-043 81fcd18e8d Draft: Fix workingplane auto alignment to Front view 2022-09-12 02:42:19 +02:00
marioalexis 3a41e39de8 Gui: Prevent crash when trying to create ExpressionBinding without arguments 2022-09-12 02:29:11 +02:00
wmayer 1d074847b6 Base: implement default constructor and open() function for Base::ifstream and Base::ofstream 2022-09-12 02:27:05 +02:00
IFo Hancroft 83badab7c0 Update org.freecadweb.FreeCAD.xml 2022-09-11 22:27:13 +02:00
IFo Hancroft 2f49c0979f Fixes filetype icon not showing
Fixes the icon of .FCStd files not showing because the xml element was
called icon instead of generic-icon
2022-09-11 22:27:13 +02:00
wmayer c0d54e0a49 Gui: [skip ci] fix UTF-8 handling of icon resources 2022-09-11 22:19:09 +02:00
wmayer 5b9cfb2d32 App: fix possible dangling pointer in Document::removeObject() 2022-09-11 22:15:43 +02:00
luz paz 44783edf98 Follow-up typo fixes 2022-09-11 22:14:45 +02:00
0penBrain 09dd45aa7a [Bugfix]Sketcher: some user colors aren't taken into account 2022-09-11 22:08:33 +02:00
0penBrain fe085edd79 [Bugfix]Gui: allow set up expression even if property value is currently being edited 2022-09-11 22:08:32 +02:00
wmayer cba832d1e6 Mod: replace std::ifstream/std::ofstream with Base::ifstream/Base::ofstream 2022-09-11 21:58:43 +02:00
wandererfan 58d028b4ba [TD]fix misspelled preference key 2022-09-11 21:50:05 +02:00
wandererfan e6f9974235 [Part]fix makeWireString for Win & Py > 3.09 2022-09-11 21:44:56 +02:00
sliptonic 0793fcccca Merge pull request #7438 from Syres916/patch-54
[Path] Change Default Drilling Retraction from G99 to G98
2022-09-11 21:42:47 +02:00
wmayer 9d5b46196e PD: [skip ci] fix UTF-8 handling in Hole feature 2022-09-11 21:33:40 +02:00
wmayer 1ccdc547a9 TD: fix UTF-8 handling in LineGroup 2022-09-11 21:33:40 +02:00
0penBrain 5de0153a36 PartDesign: improve offset handling of SubShapeBinder 2022-09-11 21:19:27 +02:00
wmayer 639546574e Py: make FreeCAD 0.v20 to compile with Py3.11
As requested in this thread: https://forum.freecadweb.org/viewtopic.php?p=622230#p622230
2022-08-30 15:26:12 +02:00
Syres916 882ba47de7 [0.20] [AddonManager] Minor Bugfix with Mod folder
https://forum.freecadweb.org/viewtopic.php?p=617191#p617191
2022-08-24 23:39:02 -05:00
Chris Hennes ad6353995e Addon Manager: Fix bug in dependency resolver 2022-08-24 15:25:16 -05:00
Chris Hennes a95fa37d3e AddonManager: Fix bug in dependency resolver. 2022-08-24 10:23:38 -05:00
jbaehr 56d6a02b1b Fix MacOS-X build of FreeCAD-0.20.1 (#7389)
* Fix build on MacOS-X 10.14: missing cmath header
(This undoes a small part of commit 9ec0bcdcf2,
which seems a bit too agressive. Without the cmath header the build fails
using Apple clang version 11.0.0 (clang-1100.0.33.17) on Mojave)

* Fix build on MacOS-X 10.14: missing Xerces include dir
2022-08-24 00:47:35 +05:00
Uwe b14a90946b [FEM] Elmer: fix flux equation
- the Flux solver must be executed before Heat and Electrostatic
- the analysis can have multiple Flux equations -> write a unique solver name to case.sif
- the Flux equation can currently only take 2 possible values. Therefore provide them as enum
2022-08-16 03:53:09 +02:00
Uwe adf84d0ecf [FEM] potential constraint: change default value
- in practice one wants to apply potentials to faces via this constraint, therefore enable to set a potential by default, also assure that the initial unit is V
2022-08-15 02:43:33 +02:00
Uwe 64c79f51db [FEM] potential constraint: allow to set expression for value 2022-08-15 02:43:32 +02:00
Uwe 3bb9491fba [FEM] [skip CI] Elmer writer: fix indentation mistake
- found by Pylint checker
2022-08-14 20:53:11 +02:00
Uwe 046f0384f4 [Gui] revert setting unit factor for F/m
- see https://github.com/FreeCAD/FreeCAD/commit/9db5dff7#r81159352
2022-08-14 20:52:47 +02:00
Uwe 279a2c3fb2 [FEM] permittivity: improve code
- in commit 9db5dff7 I hard-coded the permittivity incorrectly
2022-08-14 19:21:43 +02:00
Uwe fa62b41622 [FEM] fix handling of vacuum permittivity
- fix message that permittivity object was not handled
- set an expression, otherwise the user gets only "0.000" for the default of 8.8e-12
- use as unit the common "F/m" (this is also more user-friendly than "s^4*A^2 / (m^3*kg)")
- fix a ToDo
2022-08-14 19:21:43 +02:00
Uwe dfac3dbe27 [FEM] Elmer example: remove wrong permittivity
- a permittivity of 1 F/m is not physical, also not for testing. In fact overwriting a constant is not good practice for an example
2022-08-14 18:48:11 +02:00
Uwe 3cdbd61e9c [FEM] Elmer: writer: get rid of unnecessary function
- fixes the ToDo
- also remove unnecessary comment
2022-08-14 18:47:44 +02:00
Uwe ee3e46d8d1 [FEM] Elmer: handle pressure for fluids
- Elmer allows external pressure on fluid boundaries as well as for solids
2022-08-14 18:47:16 +02:00
Uwe aeab707a92 [FEM] change default pressure
- a default of 1 GPa for a pressure onto a face is not suitable. use 1 bar (100 kPa) instead
2022-08-14 07:17:49 +02:00
Uwe 0cf4b544f0 [FEM] Elmer: fix initial flow velocity
- we must allow must be several velocities because there can be several fluid bodies
- don't output flow velocity for solid bodies
2022-08-14 06:51:50 +02:00
Uwe 5129e62ed2 [FEM] [skip CI] remove an obsolete comment
- since a while there is no green hook but a QuantitySpinBox
2022-08-14 06:51:07 +02:00
Uwe fe76983fd3 [FEM] [skip CI] Elmer: add copyright
-  heavily edited these files so I am to blame now too ;-)
2022-08-14 06:50:40 +02:00
grubertechnic 394f74cf9e [TechDraw] fix up button in TaskProjGroup 2022-08-14 06:49:54 +02:00
Uwe 6d621563aa [FEM] Elmer: sort solver methods for better overview 2022-08-14 06:41:55 +02:00
Uwe fbbe82ebfd [FEM] [skip CI] fix non-Unicode character
- made problems with text editors -> change file to UTF-8
2022-08-14 06:37:33 +02:00
Uwe fb98d8611a [FEM] Elmer: fix for the Idrs method
- while adding support for the IDRS method I forgot to implement its mandatory parameter
2022-08-14 01:52:39 +02:00
Uwe 74f63c8293 [FEM] Elmer: set constraints for solver systems
- set constraints according to the Elmer docs (no conversion necessary, existing properties just stay integers)
2022-08-14 01:52:39 +02:00
Uwe 5511405272 [FEM] Elmer: just sorting to keep the overview 2022-08-14 01:52:39 +02:00
Wanderer Fan 398076fdde [TD]hatch file default handling 2022-08-14 01:50:45 +02:00
luz paz 0974cab1a4 [FEM] Substitute underscore for whitespace in CalculiX solver output
Fixes #7360  
Forum thread: forum.freecadweb.org/viewtopic.php?p=617376#p617376
2022-08-13 16:43:08 +02:00
Uwe d615b466d7 [FEM] Elmer: only output a property if necessary 2022-08-13 14:39:46 +02:00
Uwe 3fa1f515ee [FEM] Elmer: fix heat flux handling
- the heat flux in the temperature constraint is not the heat flux from the heatflux constraint. The latter is in W/m² while the first one is W/mesh node
2022-08-13 05:57:48 +02:00
Uwe 7d9855c849 [FEM] Elmer: add support to turn off solvers
- with this property the linear solver is turned off. As consequence one can this way also disable the execution of an equation without the need to delete the equation object

- also add missing preconditioners
2022-08-13 05:56:33 +02:00
Uwe 51deef0dcd [FEM] Elmer: add tooltips 2022-08-13 04:10:21 +02:00
Uwe 2e068fe4a8 Revert "[TD]fix LineFormat ctor line color"
This reverts commit 497600f8d0.
2022-08-13 04:09:44 +02:00
Uwe 7fb4ac2634 [FEM] Flow constraints: fix wrong tooltips 2022-08-13 03:42:13 +02:00
Wanderer Fan 497600f8d0 [TD]fix LineFormat ctor line color 2022-08-13 03:40:44 +02:00
wmayer 6b1e7a3546 Gui: clear combo boxes before re-filling them, fix handling of icon size in preferences pack 2022-08-13 03:37:14 +02:00
Uwe 8af35dc211 [FEM] Elmer: fix handling if fluids + solid materials
- as already reported in the forum, it was not possible to make a flow simulation when there is also solid material.
2022-08-12 06:19:48 +02:00
Uwe 877e77c09d [FEM] Selection: fix error for 2D shapes
- 2D shapes have no "Shape" attribute. This attribute was accessed before checked it it exists
2022-08-12 06:19:48 +02:00
Uwe 5a179983a2 [FEM] Elmer: allow lower relaxation factor
- despite the Elmer docs say 0.01 is the lover limit, for fluids like water, one might need down to 1e-4
2022-08-12 06:19:48 +02:00
wmayer 41f7c5f6c5 Gui: don't show non-existing and unusual directories in file dialog 2022-08-12 01:53:40 +02:00
Tobias Frost 0a61c568a6 Replace edit-cut.svg
Replace 2 instances of edit-cut.svg with the version from the tango icon
library to reslove license issue. Closes #7347.

Tango Icon Library used: http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz
Location within the tarball:
./tango-icon-theme-0.8.90/scalable/actions/edit-cut.svg
2022-08-11 17:00:01 +02:00
wmayer a22a43b927 Draft: fix snapper icons
* Add convenience function to get 3D views from MDI area
* Use 'inherits' instead of 'QMetaObject.className()' to check more reliably for sub-classes
2022-08-11 16:58:44 +02:00
Wanderer Fan 3ee4ffc404 [TD]fix multiple dimension drag 2022-08-11 16:57:16 +02:00
Uwe f5d13554ec [FEM] [skip CI] remove unused import for potential 2022-08-10 13:44:09 +02:00
Uwe 57e0e6e769 [FEM] [skip CI] formatting fix for potential 2022-08-10 13:42:54 +02:00
Uwe 31376b12ad [FEM] electric Potential: add missing conversion
- add missing conversion of property change that was already done before FC 0.20
2022-08-10 13:33:39 +02:00
Uwe c96fe6b32e [FEM] Elmer: fix material bug and improve material handling
- for fluid material writing the elasticity solver failed with unknown Young Modulus
- fix regression with checking for fluid material. Checking the material of the bodies is not sufficient. One can e.g. have a solid without bodies defined, then it applied to all bodies and there might be a fluid defined for only one body. Checking the body's material would then deliver there is no fluid
2022-08-10 06:17:04 +02:00
Uwe c06f24122b [FEM] update a bimetal testfile 2022-08-10 04:26:37 +02:00
Uwe 88dc25d151 [FEM] Elmer: set constraints for relaxation factor
- the relaxation factor is crucial for nonlinear systems thus help the user by setting constraints and convenient steps.
Since the property stays a float no update is necessary, existing properties just stay a normal float
2022-08-10 04:11:07 +02:00
Uwe ad7e780a1f [FEM] Elmer: notify users about missing fluid material
- it was often unclear when no flow equation was written to the case.sif (was a regression FC0.20)
2022-08-10 03:29:51 +02:00
Uwe 4d5135ac4b [FEM] fix bimetall example
- add missing density
- set a second temperature to make the heat solver actually working
- adapt to new defaults
2022-08-10 02:28:13 +02:00
Uwe a00268b5ed [Material] add materials used by our examples
- add generic copper and invar
- also extend the generic aluminum card
2022-08-10 02:09:35 +02:00
Uwe c31af916bc [FEM] Elmer: automatic update for BiCGstablDegree
- up to last week we used the invalid BiCGstablDegree 0 thus update to the default of 2
2022-08-10 02:08:54 +02:00
Uwe 25b39419fd [FEM] fix selection issues with flow velocity constraint
- same fix as commit 7e071623 for flow velocity constraint
- the used selection widget did not highlight the selected faces. This made it very hard to work with when one has an existing document where e.g. 5 faces have a certain velocity and you cannot figure out which ones.
To fix this use another selection widget
2022-08-10 01:38:55 +02:00
Uwe 18bdc5c551 [Part] manually backport second part of today's override fixes 2022-08-10 01:30:59 +02:00
wmayer 3c8404fd09 Part: fix build failures with OCC >= 7.6 2022-08-10 00:59:45 +02:00
Uwe 7f8c5bcd85 [FEM] Elmer: fix broken example
- (a regression to FC 0.20.0), use new settings ("direct" is already the default, iterative solving takes here about 5 times longer, DisplaceMesh must be False)
2022-08-09 05:39:11 +02:00
Uwe b2fe784efd [Win installer] prepare for 0.20.1 release 2022-08-09 04:21:57 +02:00
Uwe ddbcc0b3d5 [Build] output point release version
- to Splashscreen, About, MainWindow and Console
2022-08-09 03:32:24 +02:00
Uwe 87953bf330 [FEM] increase size of generic solver task panel
- increase it to size of CCX panel to create more room for the log output
2022-08-09 03:23:52 +02:00
sliptonic 9e267241fe Merge pull request #7333 from mlampert/bugfix/external-thread-issues
PATH: Bugfix/external thread issues
2022-08-09 00:49:40 +02:00
Uwe 8fe6438ca8 [FEM] backport a variable renaming
- to avoid merge conflicts
2022-08-08 12:49:46 +02:00
Uwe 855634a670 [FEM] Elmer: scale EigenMode results
- for an not yet known reason the result from Elmer are only for eigen analyses a factor 1000 (we send the mesh scaled to Elmer and it seems the eigen solver does not notice this)
Therefore scale these results
2022-08-08 12:36:17 +02:00
Uwe 194902fb90 [FEM] fix warp filter factor
- since our mesh is in mm, we must multiply the set factor by 1000 to get the real factor. This applies also for pipelines from CCX results.
Now the factor fits with the factor one can set in the CCX results dialog
2022-08-08 12:35:21 +02:00
wmayer b221137067 Gui: set width of list box according to text length 2022-08-08 12:34:18 +02:00
Uwe 2be012c9c6 [FEM] backport some changes to resolve merge conflicts
- manually done
2022-08-08 11:39:13 +02:00
berniev 3e6f7cfc53 Gui: redundant void 2 2022-08-08 11:16:32 +02:00
berniev 8714208cfb App: redundant void 2 2022-08-08 11:14:47 +02:00
wmayer 0ddacad17a Mod: [skip ci] improve whitespace 2022-08-08 10:59:29 +02:00
wmayer 73af68afc5 Gui: [skip ci] include header with export macros 2022-08-08 10:58:22 +02:00
Uwe 365230d313 [FEM] update test files 2022-08-08 03:26:56 +02:00
Uwe 898a57ca29 [FEM] collected Elmer fixes
- manually merge the recent Elmer fixes and novelties
2022-08-08 02:39:14 +02:00
Uwe c2ae76dd77 [FEM] add generic Aluminum material
- with full thermal info
2022-08-08 02:24:09 +02:00
Roy-043 02d6b1dd51 Sketcher: Fix sWhatsThis for Sketcher_CompConstrainRadDia (#7324) 2022-08-08 02:14:04 +02:00
luz paz bcdc681755 FEM: remove trailing whitespace from various FEM files 2022-08-08 02:13:22 +02:00
Uwe d8ed961e35 [FEM] fix pipeline recompute issue
- after a simulation was run, the pipelines and its childs are recomputed but its shape coloring is not updated.

- also update XML documentation
- also remove comment in tasks.py for now
2022-08-08 02:08:05 +02:00
Uwe 73132b3743 [FEM] add framework to scale result mesh values
- it seems that we will need to scale result values (probably for the Elmer Eigen solver)
  This PR adds the framework to do this. It is meant for Elmer but designed versatile.
2022-08-08 02:06:32 +02:00
Uwe 6da987a91b [FEM] fix pipeline recompute bug
- on recomputing scalar or warp filters the information about the field was lost.
  This is because the validity of an array was tested before it is actually filled

- also fix MSVC warning of using a C++ keyword as variable
- also avoid an unnecessary recompute after Elmer solver was run
2022-08-08 00:09:37 +02:00
wmayer 7fd0a19ed7 Gui: improve integrated Python console:
* correctly handle the case that Py_BuildValue() can return a null pointer
* fix a latin1 <-> UTF-8 conversion problem
2022-08-07 19:36:08 +02:00
Uwe 5922dd75bf [FEM] pipeline fix when there is no field
- for the case that pipeline with a field is active, then another pipeline that does not display any field, we cannot just return because the pipeline cannot have the color bar range of the prevision pipeline
2022-08-07 15:27:29 +02:00
Uwe f99c270091 [FEM] [skip CI] set unit for potential loads 2022-08-07 15:18:47 +02:00
Uwe 7fcf092632 [FEM] update Elmer test files 2022-08-07 06:54:37 +02:00
Uwe 93db713b0e [Base] attempt to make a Path backport compiling 2022-08-07 06:49:58 +02:00
Uwe 1571a4817f [FEM] make point filter aware of electric flux
- make point filter aware of electric flux (manually backported)
2022-08-07 06:35:31 +02:00
Uwe 9fd20de4b8 [FEM] fix selection issues with electrostatic constraint
- the used selection widget did not highlight the selected faces. This made it very hard to work with when one has an existing document where e.g. 5 faces have a certain voltage and you cannot figure out which ones.
To fix this use another selection widget
2022-08-07 06:30:53 +02:00
Uwe a4d95722e2 [Fem] Elmer: writer: remove unused variable 2022-08-07 06:29:48 +02:00
Uwe 59da0af311 [FEM] make point filter aware of force density 2022-08-07 06:28:01 +02:00
Uwe 7fbae8a314 [FEM] Elmer: resale the mesh using Elmer
- according to Peter from the Elmer team, we can use Elmer for both, scaling in and scaling back just for consistency
2022-08-07 06:25:28 +02:00
Uwe 8913921f5b [FEM] Elmer: fix pipeline update issue
- the existing result pipeline can have several children. They must all be updated.
2022-08-07 06:24:16 +02:00
berniev da88c7a6d3 give success message normal prominence 2022-08-07 06:23:23 +02:00
sliptonic 002fcacd57 Merge pull request #7278 from mlampert/bugfix/vcarve-c++-exception
PATH: Bugfix/vcarve c++ exception
2022-08-06 03:58:33 +02:00
Uwe 0c14bcb0d9 [Fem] Elmer: update test files 2022-08-05 02:42:45 +02:00
Yorik van Havre bfe8b89da1 Draft: Enabled shortcut for undo segment - fixes #6181
That shortcut had apparently been left out last time the system was recoded..
I used the default shortcut '/' because Ctrl doesn't really work with the
current system, and Z is already taken
2022-08-05 02:30:03 +02:00
Uwe eb4a62f945 [FEM] Elmer: sync input scaling with master 2022-08-05 02:29:14 +02:00
Uwe 40c4f6585b [FEM] fix enable editing for all solvers
- currently for Z88 nothing happens when clicking the Edit button in the solver task dialog. The reason is that opening *.txt files was never implemented
- also do this for Elmer
- for Z88 we need to open several file for a proper editing because the solver info is distributed over these files
2022-08-04 04:25:36 +02:00
Uwe 75d970afda [FEM] Elmer: setup new pipelines like we do for CCX
and manually new created ones
2022-08-04 04:25:00 +02:00
Uwe 655508d68e [FEM] Elmer: use different default linear solver
- BiCGStabl is as robust as BiCGStab but in all tested cases it converges faster
2022-08-04 04:24:34 +02:00
Uwe c66e4b4772 [FEM] Elmer: use direct solving as default for stresses
- direct solving is sometimes even 10 times faster (as fast as CCX) and as accurate as CCX
2022-08-04 04:22:59 +02:00
Uwe 2e3d9dadda [FEM] pipeline: minor highlighting fix
- if a pipeline is invisible the highlighting must not be triggered
2022-08-04 04:21:59 +02:00
Günter Neiß bfe4c724b4 OpenSCAD: remove SCAD-Import error in importCSG.py
Signed-off-by: Günter Neiß <gneiss@web.de>
2022-08-04 01:20:45 +02:00
wmayer ff659b1352 Fem: [skip ci] fix possible crash in PropertyPostDataObject::getMemSize 2022-08-04 00:50:50 +02:00
Uwe b06edfcb97 [Gui] QSint: missing piece to fix QGroupBox visibility
- also the freecadscheme must be adapted (e.g. for PartDesign dialogs)
- fixes now #6102 completely
2022-08-04 00:49:51 +02:00
Chris Hennes d1d9a17a98 Addon Manager: fix thread termination bug 2022-08-03 01:21:45 +02:00
wmayer 67c24b5749 Fem: [skip ci] replace the SoAnnotation with an SoSeparator to fix rendering artifacts for non-convex objects 2022-08-03 01:15:58 +02:00
wmayer 426ff82c87 Fem: use SoAnnotation to highlight result pipeline objects 2022-08-03 01:15:14 +02:00
carlopav 22e8085394 [Draft] Fix Draft Edit AddPoint with BSpline
ref. https://forum.freecadweb.org/viewtopic.php?p=613622#p613622

Fix Bug when adding point to a BSpline.
2022-08-03 01:14:01 +02:00
luz paz b522212d71 AddonManager: Fix source comment typos
[skip ci]
2022-08-03 01:11:58 +02:00
Uwe 6146311a94 - fixes #6102
- the point is that we don't set any style for the group boxes, therefore the Windows style is applied as nothing was set yet. The default Windows style is the color #dddddd which is hardly visible on our blue default style.
as solution set an explicit color.
2022-08-02 05:22:30 +02:00
Yorik van Havre 68b5d8dbca Merge pull request #7259 from Roy-043/Draft-Fix-handling-of-groups-on-move-copy-and-rotate-copy
Draft: Fix handling of groups on move-copy and rotate-copy
2022-08-02 05:19:10 +02:00
wmayer 3a424136ff Spreadsheet: fixes #7285: [Bug] FreeCAD crashes if cell value ' is set in Spreadsheet 2022-08-01 11:51:53 +02:00
Uwe 67682e2bb3 [.github] [skip CI] checks.yml: disable a whitespace check
- todo whitespace is not important
2022-08-01 04:38:47 +02:00
Floriansimmer 65b1048463 Ci v2 (#7282)
* Github: Build and Test

Build and Test:
- ccache
- build
- Unittest
- install
- Unittest of install
- report

misc:
- use .clang-tidy file to configure Clang-tidy checks
- use use .pylintrc to configure Pylint checks
- Update changed-files Action
- better regex for file extension filter
- show enabled clang-tidy checks in Step Report
- show enabled Pylint Checks
- cpplint filter documentation
- modified cpplint filters recomended by https://github.com/sider/runners/blob/HEAD/images/cpplint/sider_recommended_CPPLINT.cfg
- fixed Branch filter for Clazy QT6 checks --> has only worked on pull requests
- fail the CI only on Build  errors, Unittest errors and misspellings

* Github: remove Codespell action as it is now integrated into the check workflow
2022-08-01 04:37:23 +02:00
Uwe 6975093d6e [FEM] Elmer: fixes for the point filter
- use correct names and support all possible outputs
2022-08-01 04:35:32 +02:00
Uwe 2893474ab2 [FEM] Elmer: update .sif files
- because of solver default settings change
2022-08-01 04:34:41 +02:00
Uwe 4430a1cce9 [FEM] Elmer: set sensible defaults for elasticity equation
- for BiCGstabl the minimal degree is 2, but 3 is recommended
- when adding the equation, it should do something, therefore enable the calculation of the principal stresses (as it was, nothing was calculated except of the displacement)
2022-08-01 04:34:41 +02:00
wmayer 75b912b173 Fem: implement a selection observer to notify a ViewProviderFemPostObject when its selection status has changed 2022-07-31 21:20:09 +02:00
Uwe 01ae4db181 [FEM] Constraint: BodeHeat: fix regression from commit 22c64ef8
- a simple indentation mistake
2022-07-31 21:19:00 +02:00
Uwe 8303a55092 [FEM] add missing eigenfrequcy calculation for Elmer
- while for CCX we output the eigenfrequency, for Elmer the user had to perform the calculation of a sqrt of the complex result.
This is inconvenient and error-prone and also requires the knowledge where the result is output by Elmer and in what format. (cast me more than an hour to find this out)
Therefore perform the calculation for the user and output the result.
2022-07-31 05:44:14 +02:00
Uwe 9c7f869e3b [FEM] Elmer: fix small number property handling
- use an expression as discussed: https://forum.freecadweb.org/viewtopic.php?p=613897#p613897
2022-07-31 05:43:01 +02:00
Uwe fdb3dd9de4 [FEM] Elmer: fix eigenmode results for point filter
Elmers' eigenmode results have a different result name
2022-07-31 05:42:06 +02:00
adrianinsaval 014ed4ccc5 Bump PACKAGE_VERSION_PATCH for next patch release 2022-07-31 05:39:28 +02:00
Chris Hennes e51acb490c Addon Manager: Add other_files download for wiki macros 2022-07-30 21:35:19 -05:00
Uwe 58c9ed6028 [FEM] Elmer: add missing direct variant MUMPS
- also use capitalized wording to Umfpack as Elmer does
2022-07-30 20:10:35 +02:00
Zheng, Lei bb55fe76db Gui: fix ViewProviderLink transform with scale
Fixes FreeCAD/FreeCAD#7113
2022-07-30 19:17:55 +02:00
Uwe 451d95d04a Revert "App: fixes #7277: Write to network drive fails on Windows"
This reverts commit c00740aa15.
2022-07-30 16:09:50 +02:00
wmayer c00740aa15 App: fixes #7277: Write to network drive fails on Windows 2022-07-30 14:04:33 +02:00
Adrian Insaurralde Avalos 25ea7e41a6 [python init] Prepend install prefix if libdir is not absolute
For python init script so it can work by default
2022-07-30 00:33:07 +02:00
wmayer 191c95c0ea Mod: [skip ci] fix warning: [-Wreturn-std-move] 2022-07-30 00:21:35 +02:00
wmayer f5096a17e2 Gui: [skip ci] mkae sure the tooltip in ActionGroup::onActivated() disappears again 2022-07-30 00:12:29 +02:00
wmayer 130da19292 App: fixes #7112: Addon manager does not work on windows with special characters in the username 2022-07-29 10:06:34 -05:00
Wanderer Fan 5df4501ccc [TD]fix redraw does not paint all views 2022-07-29 01:37:00 +02:00
Wanderer Fan 919e31ea27 [TD]fix Symbol update on property change 2022-07-29 01:35:59 +02:00
Uwe 60499ffcd4 [Sketcher] fix icon name
- fix a FIXME, Sketcher_CreateEllipse depicts already the right thing, it just has to be renamed
2022-07-29 01:34:51 +02:00
Chris Hennes 8811dc4a48 Addon Manager: Fix get_zip_url for non-github URLs 2022-07-28 02:11:24 +02:00
wmayer 86686ab7ed Part: [skip ci] add unit test for PR #7260 2022-07-27 17:02:48 +02:00
Uwe 55bcd7bf19 [FEM] fix PostObject hiding issue
- when a PostObject is hidden the FemPostDataAtPointFilter must not be taken into account
2022-07-27 16:59:14 +02:00
Uwe 264227ae7b [FEM] sync an icon with master 2022-07-27 16:45:05 +02:00
Uwe 67cafa1453 [FEM] PostDataAtPoint: remove unnecessary style setting
- PostDataAtPoint is a point therefore setting a filling style is not necessary

- also fix a typo in a comment
2022-07-27 16:16:18 +02:00
Uwe a181437a71 [FEM] skip CI] update a comment 2022-07-27 16:11:23 +02:00
Uwe 390461c581 [FEM] update ViewProvider selection code
as suggested in
https://github.com/FreeCAD/FreeCAD/commit/67e836b7e953cf5901a337a6f56df34a0446cd6a#r79459854
2022-07-27 16:11:23 +02:00
Uwe c1b350f117 [Sketcher] CommandCreateGeo: next attempt to fix compilation 2022-07-27 16:03:37 +02:00
Uwe d5404eed47 [Sketcher] CommandCreateGeo: fix compilation 2022-07-27 15:40:06 +02:00
tomate44 75186322eb [Part] BSplineSurface: fix KnotSequence for periodic BSpline surfaces 2022-07-27 15:03:31 +02:00
Uwe 93fe24201a [Sketcher] [skip CI] whitespace fix 2022-07-27 15:02:50 +02:00
0penBrain 9d729cf114 [BUGFIX] Sketcher: fix icon normal/construction toggling when commands used in custom toolbar
Fixes #7064
2022-07-27 14:51:12 +02:00
Chrismettal 0d10011b38 [Stylesheets] Remove whitespace and add "checked" icon style 2022-07-27 14:24:07 +02:00
Uwe f81f9e3bab [FEM] BodyHeat constraint: use unique icon
- it was not possible to distinguish the constraint from the heatFlux constraint
2022-07-27 14:04:40 +02:00
Uwe 4b092abdb0 [FEM] BodyHeat constraint: hide unused property
- the constraint does not take a references and when trying to set one as user because one thinks this empty property must be set, one gets a recompute error
2022-07-27 14:04:40 +02:00
wmayer 341e017960 Spreadsheet: fix several memory leaks 2022-07-27 14:02:45 +02:00
Uwe aae0a70bb6 [FEM] PostObject: improve color bar refreshing
- for data point filters the color bar must not be updated
2022-07-26 04:14:58 +02:00
Uwe ff1e67b44d [FEM] Elmer writer: fix errors on missing material properties
- we must in this case raise an error and stop the writer script
2022-07-26 04:13:55 +02:00
Uwe a3e00bd73e [FEM] update bodyHeatSource
- to the state of the other constraints

(this constraint is currently completely broken by the way)
2022-07-26 04:13:17 +02:00
adrianinsaval 28773a081c Improve grid maxNumberOfLines warning message 2022-07-25 21:03:31 +02:00
wmayer 632ac1521a Part: add instruction how to adjust the maximum number of grid lines 2022-07-25 21:01:28 +02:00
Uwe 53977e0220 Fem: [skip ci] Fix several clazy issues: * Maybe you meant to call base method instead [-Wclazy-skipped-base-method] * Using copy-ctor but class SbMatrix has a trivial copy-ctor but non trivial assign operator [-Wclazy-rule-of-two-soft] * Missing emit keyword on signal call FemGui::PointMarker::PointsChanged [-Wclazy-incorrect-emit] 2022-07-25 20:47:42 +02:00
Uwe 6ba6463107 [FEM] Elmer: fix python error when solver failed
we must then stop the execution of the script
2022-07-25 03:39:41 +02:00
Uwe 9cfbdbe96c [FEM] ViewProviderDocumentObject: fix parenthesis mistake
(I don't know how this happened)
2022-07-24 19:34:55 +02:00
Uwe 7a9a7544ea [FEM] fix color bar handling on hiding post objects
- fixed the remaining part of #7230: on hiding an object, refresh the color bar of the new visible object (if there is any)
2022-07-24 19:34:55 +02:00
Uwe a1d57f9877 [FEM] set default selection mode to BoundBox for post objects
- this fixes a long-standing annoyance that popped up also from time to time in the forum:
  the post objects deliver information via its coloring but a selection in the tree changed the shape color

Even experienced users like me did not know about the SelectionStyle property and always had to click into the model to see the real color, not the selection color.
Therefore SelectionStyle set to BoundBox is sensible as default settings for post objects since this assures that the users always see the right coloring.
2022-07-24 19:34:55 +02:00
Uwe 5bea268817 [.github] try to get the checks also for the 0-20 branch 2022-07-24 06:10:09 +02:00
Uwe add9dd377b Revert "a test for .github"
This reverts commit 25865955b1.
2022-07-24 06:09:11 +02:00
Uwe 6fd477d34b [.github] disable tidy checks for now
- as requested in https://github.com/FreeCAD/FreeCAD/pull/7152#issuecomment-1193176866
2022-07-24 06:07:39 +02:00
Uwe 3b6a83e1b4 [.github] disable clang checks for now
see https://github.com/FreeCAD/FreeCAD/pull/7152#issuecomment-1193167296
2022-07-24 06:07:39 +02:00
Floriansimmer 777bafbc1c Github: basic check CI Run (#7152)
* Github: basic check CI Run

- trailing Whitespace
- tab
- string based QT connections
- Cpplint
- pylint
- Black
- clang-format
- Codespell
- clang-tidy
- clazy (+QT6 Checks)
- Report
2022-07-24 06:07:39 +02:00
mosfet80 03ad5fd551 Git ignore hidden files with defined exceptions (#7108)
* git ignore all hidden files

* Removal file with non-existent link

* git Ignore all hidden files except .gitignore

* Set exceptions in gitignore
2022-07-24 06:07:39 +02:00
Uwe 25865955b1 a test for .github
ignore
2022-07-24 06:03:54 +02:00
Uwe a5860ad542 [FEM] fix regression of missing stress results
- fixes the regression that went in short as "last minute fix": commit 3af54a7dda -> fixes #7242

- also remove a doubled entry in an IF
2022-07-24 05:51:23 +02:00
Uwe ca013f6af7 [FEM] TaskBoxes: add missing info about transparency
The user had no info about the current transparency nor the value he will be selecting.
2022-07-24 05:50:28 +02:00
Uwe 85c8aeb40c [FEM] task_material_common: add a comment 2022-07-23 17:39:36 +02:00
Uwe 8c376a89f2 [FEM] fix material task dialog for fluids
- this fixes a mistake from commit ef088674
- it also consistently use the thermal expansion coefficient
- add code comments

now the material task dialog works with all fluid materials without errors or warnings
2022-07-23 17:39:36 +02:00
Syres916 39fd2593c1 [Part] Bugfix Primitives correction of decimal..
...places on creation
See https://forum.freecadweb.org/viewtopic.php?f=3&t=70339
2022-07-23 17:37:04 +02:00
wmayer fdeee21237 Part: fix TopoShape.isInside() for faces 2022-07-23 17:35:43 +02:00
Uwe 58a87e1ca4 [FEM] better fix for missing colorbar update for FemPostObject
- better fix for #7230 because we can call the direct paint method and because the bar is now also updated when the object is shown

- also add a ToDo note
2022-07-23 17:16:49 +02:00
Uwe 34e60c6731 [FEM] fix missing colorbar update for FemPostObject
- fixes issue #7230

- to update the color bar for post objects, the Field property has to be reset to trigger this. This PR does this.
2022-07-23 17:16:49 +02:00
Roy-043 fc33aed8c1 Arch: Housekeeping: import translate from correct file 2022-07-23 17:00:33 +02:00
Uwe 8ad3fc8ccc [FEM] [skip CI] fix UI file height entry
- was automatically done by QT designer
2022-07-23 16:59:55 +02:00
Uwe a64469320c [FEM] [skipCI] ViewProviderFemPostPipeline: remove unused include
- also sorting
2022-07-23 16:58:39 +02:00
Yorik van Havre 96ea0d266a Merge pull request #7215 from Roy-043/Draft-Remove-unnecessary-DisplayStatusbar-preference
Draft: Remove unnecessary DisplayStatusbar preference
2022-07-20 12:19:08 +02:00
Uwe 832100482c [PD] TaskExtrudeParameters: add missing simplification
forgot this change in commit 98dae1b2
2022-07-20 12:18:07 +02:00
Uwe f9f753e321 [PD] TaskExtrudeParameters: simplify code
to avoid several time the same translatable string
2022-07-20 03:22:44 +02:00
adrianinsaval fb223c2587 [PD Pad/Pocket] Fix bug with midplane usage in TwoLengths mode (#7216)
* [PD Pad/Pocket] Fix bug with midplane usage in TwoLengths mode
2022-07-20 03:22:03 +02:00
wmayer c98a03ecc6 Gui: fix crash in ViewProviderLink::currentDraggingPlacement() if there is no active dragger 2022-07-20 03:21:35 +02:00
wmayer 7f39542a73 Part: add instruction how to adjust the maximum number of grid lines 2022-07-20 03:21:01 +02:00
Yorik van Havre cc3d165ed8 Merge pull request #7181 from manuvarkey/bug_fix_1
Fix bug #6679, add new profiles
2022-07-19 03:16:29 +02:00
Roy-043 58d27e220f Arch: Fix getCutVolume in ArchCommands.py 2022-07-19 03:13:34 +02:00
Yorik van Havre 3b5dd5b852 Merge pull request #7200 from Roy-043/Draft-Fix-color-handling-in-make_point.py
Draft: Fix color handling in make_point.py
2022-07-19 03:12:37 +02:00
Yorik van Havre d385cbece7 Merge pull request #7174 from Roy-043/Draft-Fix-EditMode-for-hatch,-facebinder-and-shapestring
Draft: Fix EditMode for hatch, facebinder and shapestring
2022-07-19 03:11:24 +02:00
Yorik van Havre 98897fb356 Merge pull request #7176 from Roy-043/Draft_Add_resetEdit_to_gui_hatch.py
Draft: Add resetEdit to gui_hatch.py
2022-07-19 03:07:46 +02:00
Yorik van Havre 8b433990ad Merge pull request #7173 from Roy-043/Draft_Fix_setEdit_in_view_text.py
Draft: Fix setEdit in view_text.py
2022-07-19 03:06:52 +02:00
Yorik van Havre 0e7449aef1 Merge pull request #7141 from Roy-043/Draft-make_hatch.py-should-return-the-object
Draft: make_hatch.py should return the object
2022-07-19 03:04:37 +02:00
sliptonic feab004970 Merge pull request #6974 from agren/restore-path-drilling-retract-behaviour
Path: Restore drilling op retract value to user supplied Retract Height
2022-07-18 00:38:38 +02:00
Uwe 136eb1d17a [PD] add parameter enabling logic for pad/pocket
- currently all parameters are always enabled and thus can lead to errors like the one reported here:
https://forum.freecadweb.org/viewtopic.php?f=3&t=70266
2022-07-18 00:31:55 +02:00
Uwe 50f112eaff [PD] improve face selection for Pad/Pocket
- this PR extends PR #7191 as described in this forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=70327
2022-07-18 00:29:09 +02:00
Uwe a7dbbd5f21 [FEM] fix Z88 binary handling
- when the binary was not found, the function called the non-existing binary
- also push error message for Elmer and Z88 to the status info so that user gets feedback also when report view console is not shown
- uniform wording to 'binary'
- avoid unnecessary console output
2022-07-17 03:39:21 +02:00
Uwe 89ecdae088 [PD] fix Pad/Pocket logic issue
- fixes the bug reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=70266
  as Method #2
  -> When switching to two dimensions, symmetric must be unchecked if it is checked
2022-07-17 03:24:19 +02:00
Uwe 13c4de32f2 [FEM] check if solver executables exist
- currently one can enter any path for the solver executables, a check is missing

- moreover for Z88 the executable name is error-prone (just happened to me and cost me half an hour to find out what is wrong), therefore check also the correct filename. For Elmer this cannot be done since there are different executables one can choose of (e.g. for multi-threading etc.)
2022-07-17 03:21:42 +02:00
Uwe abc61d3e14 [FEM] check if Gmsh, CCX and Mystran solver binaries exist
- adds the check like we have already for Z88 and Elmer
- also remove an unnecessary return statement
2022-07-17 03:13:59 +02:00
Uwe 6be3aef0e2 [FEM] fix CCX (new framework) binary handling
- when the binary was not found, the function called the non-existing binary
- also push error message to the status info so that user gets feedback also when report view console is not shown
2022-07-17 03:07:50 +02:00
Uwe 8cd18ce93e [FEM] [skip CI] tell user when Elmer write succeeded
At the moment the user gets no feedback, while for Z88 and CCX he gets a result
2022-07-17 03:04:12 +02:00
Uwe 7979e8c639 [Gui] preferences: clarify Part/PD page
- users are confused that we have a preferences page named "Part design" that also defines things for the Part WB. The Wiki is clear that the preferences page is for both, Part and PD, however the UI is not.
This PR makes this clear.
2022-07-16 18:09:15 +02:00
wmayer e0a8a7f306 PD: fix ProfileBased::getSupportFace() to also handle the case where a support face is selected 2022-07-16 17:35:34 +02:00
wmayer 233685616d PD: rename getUpToFaceFromLinkSub to getFaceFromLinkSub 2022-07-16 17:35:34 +02:00
Roy-043 22c971499a Update view_facebinder.py
There is no need for `Gui.Control.closeDialog()` in `setEdit`
2022-07-16 17:33:29 +02:00
Roy-043 e2ed278874 Draft: Fix Hatch task panel title
Form -> Hatch
2022-07-16 17:32:47 +02:00
Marshal Horn c97f1afd72 Replaced python2 usage of next()
iterator.next() is deprecated in python3.
next(iterator) is the direct replacement.
In some cases a for() loop makes more sense
2022-07-16 17:29:23 +02:00
Wanderer Fan 8d5f274d03 [TD]fix crash on body with no shape 2022-07-14 01:59:41 +02:00
Bernd Hahnebach bd2a9b259d FEM: Python code formatting 2022-07-14 01:56:54 +02:00
Uwe c68d109db1 [FEM] femutils.py: style changes
- as requested
2022-07-14 01:55:10 +02:00
Uwe c1bea323d2 [FEM] fix solver console bugs
- for Elmer and Z88 on Windows several windows pop up (console windows). This is maybe annoying and the user is wondering what is going on, but the main problem is that when you close them, you break the solving process.
Therefore, on Windows only, hide the empty popup windows.
2022-07-14 01:55:10 +02:00
sliptonic 179329d1ba Merge pull request #7137 from Russ4262/fix/path_array_polar
Path: Fix Type=Polar regression in PathArray
2022-07-14 01:51:40 +02:00
Uwe b0e55b69ed Merge pull request #7178 from sliptonic/bug/misc
[Path]  Several small bug fixes
2022-07-14 01:47:26 +02:00
Bernd Hahnebach fc13b150d5 FEM: elmer solver writer, add some comment in the regard of units 2022-07-14 01:37:30 +02:00
wmayer 9e3618005e Part: [skip ci] fix possible build failure 2022-07-14 01:34:26 +02:00
Peter Marquardt fcba255925 Draft: fix spacing of ToolTip text 2022-07-14 01:32:17 +02:00
Bernd Hahnebach f6e1aeabe3 FEM: typos, found with:
codespell -q 2 -S *.ts -S *.dyn -S *.svg  -L childs,dof,dum,freez,methode,nd,normaly,programm,som,uint,vertexes,inout  src/Mod/Fem/
2022-07-14 01:30:54 +02:00
Uwe bbc5ca8a74 [FEM] fix CCX multi-threading bug
- in the preferences one could specify more CPU cores than available

- also correct a label sine the number of cores are since FC 0.20 used for all CCX solver runs

- also remove unnecessary (doubled) slots from the UI file
2022-07-10 17:34:48 +02:00
Uwe 0e304cd22b [FEM] remove doubled slots from preferences UI files 2022-07-10 17:34:48 +02:00
wehrle cc55bf7d83 correction 2022-07-10 13:44:24 +02:00
Roy-043 9833f3fd99 Draft: Fix join.py 2022-07-09 20:17:31 +02:00
Wanderer Fan 6cd575600c [TD]fix bad edge in face finder 2022-07-09 20:15:50 +02:00
Benjamin Bræstrup Sayoc 23f39ad2da [TechDraw] Use function overloadin and avoid code repeat 2022-07-09 20:14:45 +02:00
wmayer 3dadeab9e0 GuiPy: allow to call setupWithoutGUI more than once 2022-07-09 20:12:41 +02:00
Roy-043 1861868428 Draft: displayStatusbarScaleWidget should be checked in preferences-draftinterface.ui 2022-07-09 20:11:18 +02:00
Roy-043 3ce1ce70c9 Arch: Invert opening symbol Simple door 2022-07-09 20:08:01 +02:00
Wanderer Fan 6e77b5ae3f [TD]fix multiple open dialogs 2022-07-09 19:43:31 +02:00
wmayer ebed2d0b33 Test: [skip ci] unit test for fix of Vector2d::Rotate 2022-07-09 19:41:46 +02:00
Wanderer Fan 74bbc3e1db [TD]fix scaling of bitmap 2022-07-09 19:35:49 +02:00
Yorik van Havre 020375256c Merge pull request #7122 from donovaly/Arch-fix-typo
[Arch] fix typo in function name
2022-07-09 19:33:02 +02:00
wmayer 323acb01cf App: fix build failure on Windows caused by PR #7034 2022-07-09 19:31:01 +02:00
flachyjoe 8bb7cfe780 [App] Fix file not found error with canonical filename
boost::filesystem::canonical doesn't resolve non existent file where
boost::filesystem::weakly_canonical does.

Notice boost::filesystem::weakly_canonical only resolve absolute path.
2022-07-09 19:29:48 +02:00
flachyjoe d25478bb35 [App] Fix #5592 : Respect symbolic links
Use the real path to the file when saving the document.
2022-07-09 19:29:48 +02:00
Wanderer Fan ed94b600ca [TD]fix bitmap hatch 2022-07-03 17:55:17 +02:00
Uwe ee78a3c046 [Base] Tools2D.h: a simplification and code style unification 2022-07-03 16:22:28 +02:00
ChenOrange 6a44d1e8ff Vector2d:fix rotate bug 2022-07-03 16:22:28 +02:00
luz paz cc90163850 LGTM: omit src/Tools/wiki2qhelp.py from analysis
Per https://lgtm.com/projects/g/FreeCAD/FreeCAD

[skip ci]
2022-07-03 16:22:02 +02:00
Uwe da1e2c22de [FEM] fix wrong console outputs for fluid materials
- since a while ThermalExpansionCoefficient is used, VolumetricThermalExpansionCoefficient is only used for the material task panel
- as already stated in a code comment, the unit of VolumetricThermalExpansionCoefficient is ThermalExpansionCoefficient, therefore we must check for ThermalExpansionCoefficient
- we must also check if ThermalExpansionCoefficient exists

- Adapt the existing fluid material cards to use the ThermalExpansionCoefficient
2022-07-03 16:17:10 +02:00
Mihail ed7c650f48 FEM WB Elmer viscosity bug fix.
In Elmer there was errors "Viscosity not found" if used mixed solid and flow calculation.
This fix disables Stokes-Navier eruation for Solid objects.

	modified:      src/Mod/Fem/femsolver/elmer/writer.py
2022-07-03 16:15:44 +02:00
Yorik van Havre ad181ce993 Merge pull request #7071 from Roy-043/Draft-Fix-Placement-in-make_sketch
Draft: Fix Sketch Placement in make_sketch (issue #7058)
2022-07-01 03:27:13 +02:00
Wanderer Fan c91c096235 [TD]fix Dimension export to DXF 2022-07-01 02:46:13 +02:00
Wanderer Fan c06f0e9132 [TD]Include CosmeticLines in Dxf 2022-07-01 02:46:13 +02:00
wmayer 5930aac110 Test: ignore UnicodeEncodeError in TestMetadata.test_file_path 2022-07-01 02:21:05 +02:00
wmayer 1d55d10a51 Test: use codecs.open in TestMetadata.test_file_path 2022-07-01 02:12:40 +02:00
wmayer 9a51cd0e34 App: issue #7112: Addon manager does not work on windows with special characters in the username 2022-07-01 02:02:44 +02:00
Roy-043 a0e5012ed0 Draft: Fix default fillmode in DraftGui.py 2022-07-01 02:01:44 +02:00
wmayer ad2c36b351 Test: [skip ci] test file path with utf-8 <-> utf-16 conversion 2022-06-30 00:33:30 +02:00
wmayer 4c74687a6d Test: extend test for enumeration 2022-06-30 00:31:32 +02:00
Roy-043 0d510a837f Draft: Fix align working plane to DatumPlane bug 2022-06-30 00:30:10 +02:00
Roy-043 c219656919 Draft: Fix align working plane to DatumPlane bug 2022-06-30 00:29:48 +02:00
wmayer bb6ab2d7c2 Part: fix GeomBSplineCurve::toBiArcs
If tangent of start and end point are parallel then also check a tangent in between to make sure that it can be considered a straight line
See https://forum.freecadweb.org/viewtopic.php?f=8&t=69710
2022-06-30 00:27:09 +02:00
Uwe ebb5a2bdc6 [FEM] fix point filter initialization issue
- on opening the task dialog of existing point filter, the point value must be displayed
2022-06-27 02:14:45 +02:00
sliptonic 7547f6c79b Merge pull request #6760 from Russ4262/fix/dressup_leadinout
Path: Fixes #6693 - Add Z and K values to arc commands
2022-06-25 19:23:44 +02:00
Uwe f4bf59e000 [PD] Hole initialization bugfix
- by default there is no hole head cut and therefore its parameter must be initialized as read-only (will be enably when user sets a head cut)

- also fix a typo

- also fix a UI file issue (automatically done by Qt Designer)
2022-06-25 16:59:19 +02:00
Kuzemko Alexsandr 79df3ea2eb [Part] Fix display "labelfillet" name for Chamfer and Fillet (#7083)
* Fix display "labelfillet" name for Chamfer and Fillet
* Synchronize options name with PartDesign_Chamfer. Proposed by  @Roy-043
@Roy-043 https://github.com/FreeCAD/FreeCAD/pull/7074#issuecomment-1165303970
2022-06-25 15:06:18 +02:00
Uwe d0c9fec938 [PD] Hole dialog fixes
- when there is no profile the change of the hole cut type was not handled
- for the deprecated hole cut types it must also be possible to use custom values
2022-06-25 14:12:06 +02:00
ShuffleWire de5e7f35e1 Base: add Const attribute to many MatrixPy methods
multiply(), determinant(), isOrthogonal(),
submatrix(), analyze() also get the const attribute
2022-06-24 02:38:20 +02:00
wmayer a015548a88 Part: add Const attribute to several methods in TopoShapePy 2022-06-24 02:38:20 +02:00
wmayer 8a56db68e7 Base: add Const attribute to MatrixPy::inverse() 2022-06-24 02:38:20 +02:00
Adrian Insaurralde Avalos 3f2df77d3f Rename FindOpenCasCade.cmake to FindOCC.cmake
To fix a warning 'name passed to `find_package_handle_standard_args` (OCC) does not match'
2022-06-24 02:37:40 +02:00
luzpaz bb51742f33 Stylesheets: fix typos
[skip ci]
2022-06-24 02:34:58 +02:00
wmayer d07ca8c3b6 Test: [skip ci] test for fixed Rotation::inverse() 2022-06-20 13:14:43 +02:00
marioalexis 763ba9e149 Base: Fix wrong function name in RotationPy documentation. 2022-06-20 02:20:46 +02:00
Uwe c62f6a7e4c Merge branch 'releases/FreeCAD-0-20' of github.com:FreeCAD/FreeCAD into releases/FreeCAD-0-20 2022-06-20 01:00:24 +02:00
Uwe 3e375b6528 update version number and copyright year 2022-06-20 01:00:05 +02:00
Christoph Moench-Tegeder 0a5a1803a5 fix Expressions assignment for FreeBSD
Just like Apple, FreeBSD uses clang as it's main compiler, and thus
runs afoul of the same problem in src/App/PropertyExpressionEngine.cpp
like Apple (issue #5281): "error: no viable overloaded '='".
Extend the fix from #5281 for the BSDs (check macro FC_OS_BSD) -
at least OpenBSD uses clang, too (maybe this check should be reworked
to test for clang, but I can't test on Apple, so let's keep this fix
minimalistic).

References: #5281
2022-06-19 16:15:02 +02:00
marioalexis be9218a76a Base: Set angle in Rotation::inverse function 2022-06-19 15:45:08 +02:00
Wanderer Fan e3865d5121 [TD]fix ProjGroup view spacing 2022-06-19 15:13:42 +02:00
Wanderer Fan 66d6379f7e [TD]fix dimension update on scale change 2022-06-19 15:13:41 +02:00
wmayer c7c9f630b3 plugin: do not exclude widget plugins from tarball 2022-06-19 15:09:22 +02:00
wmayer 6f0e049638 Mesh: fixes #6902: Conda test errors 2022-06-19 15:08:22 +02:00
wmayer 28f730a81e Mesh: fixes #7018: 3mf created with FreeCAD cannot be loaded with PrusaSlicer 2022-06-19 15:06:19 +02:00
wmayer 637472f105 Part: [skip ci] add tests for ruled surfaces 2022-06-19 15:04:16 +02:00
wmayer bd3d6aa3ed Spreadsheet: add tests for merging cells and binding cells 2022-06-19 15:02:42 +02:00
Uwe bcd43070b3 update screenshot in Readme
update screenshot to FC 0.20
2022-06-19 15:01:40 +02:00
TotalCaesar659 c6ab0be18e Update URL to HTTPS 2022-06-19 15:01:40 +02:00
Uwe 668570fc85 [Win installer] update information
- also refine a script
2022-06-19 15:01:40 +02:00
Uwe 3c565e1307 Update Readme to FreeCAD 0.20 2022-06-19 14:59:23 +02:00
11911 changed files with 2208124 additions and 3392806 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"phabricator.uri" : "http://pha.geofinder.eu/"
}
+19
View File
@@ -0,0 +1,19 @@
version: 2
jobs:
build:
working_directory: ~/test
machine: true
steps:
- checkout
- run:
command: docker pull condaforge/linux-anvil
- run:
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions.
command: ./package/conda/run_docker_build.sh
workflows:
version: 2
build_and_test:
jobs:
- build
+8 -13
View File
@@ -5,22 +5,20 @@ AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
AlwaysBreakTemplateDeclarations: MultiLine
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterStruct: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
@@ -33,7 +31,7 @@ BraceWrapping:
SplitEmptyRecord: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 100
CompactNamespaces: false
@@ -41,16 +39,13 @@ ContinuationIndentWidth: 4
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
InsertBraces: true
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: Never
PointerAlignment: Left
ReflowComments: true
SortIncludes: Never
ReflowComments: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
@@ -61,7 +56,7 @@ SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
+6 -9
View File
@@ -1,11 +1,8 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,google-explicit-constructor,
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard,
-readability-redundant-access-specifiers,-readability-qualified-auto,
-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-owning-memory,
-readability-convert-member-functions-to-static,-bugprone-easily-swappable-parameters,
-cppcoreguidelines-pro-type-static-cast-downcast'
-readability-redundant-access-specifiers'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
@@ -155,7 +152,7 @@ CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: bugprone-reserved-identifier.AllowedIdentifiers
value: '_object'
value: ''
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: 'false'
- key: readability-else-after-return.WarnOnUnfixable
@@ -289,7 +286,7 @@ CheckOptions:
- key: readability-identifier-naming.AggressiveDependentMemberLookup
value: 'false'
- key: readability-identifier-length.MinimumParameterNameLength
value: '2'
value: '3'
- key: modernize-use-emplace.TupleTypes
value: '::std::pair;::std::tuple'
- key: modernize-use-emplace.TupleMakeFunctions
@@ -411,7 +408,7 @@ CheckOptions:
- key: portability-restrict-system-includes.Includes
value: '*'
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: 'true'
value: 'false'
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
value: '<memory>'
- key: bugprone-signal-handler.AsyncSafeFunctionSet
@@ -423,7 +420,7 @@ CheckOptions:
- key: cppcoreguidelines-narrowing-conversions.WarnWithinTemplateInstantiation
value: 'false'
- key: readability-identifier-length.MinimumVariableNameLength
value: '2'
value: '3'
- key: cppcoreguidelines-narrowing-conversions.WarnOnEquivalentBitWidth
value: 'true'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnorePublicMemberVariables
-46
View File
@@ -56,49 +56,3 @@ b13088664fea77e6ac4779dddfdea7aac3c50b30
bedf9207023d6d594f2c03d2a8d799b34759a8fb
132a1d7e55eadd0cb5a09760d471780eb5bd9340
3ef438eaf03f840958a2f7a9ec585a3d2728e447
c726b69d7ede5b1af82407c515e14375f3358be3
390e09db3258e4807a3d4b2993c1723480ae5350
57d0c2000ae29d3160e0aa908ed1e027b321e36a
b389f6e602eb42c07c21f37fbcd451e28dd9fbc4
48365a1df5286c7a5608cd3a5cce0def5e4d5380
dc5b3cb495002951c3a36c928c55108b0999bc3e
875f9eaad6a59abd70775c0b67a7f10d92128a5a
7a8a453746a8e4a845219948591fd17f4494a067
8b31d7deb09077bc0cce0ecf6de02c94db262a67
4a7e1b6d9b12df211cf6fbec61cc8544e4c6bf9d
129d5882a729327a72b57ec695bb376e84205bd0
2ae7cc4a94c1ab1dfc0264367c5da4716ea02bfe
987b4bda2ac8570969dc07fa887bda420f77e441
ec899d75c6abf45d7ee4dd91ea0f8141a9818446
233a337ca5d693e4773fecf1de14325752afd658
9271b6d433578f65df9b469131ece4e4bdbb19aa
2637527e3a4e132506e8c074b752721d66ae146a
7681c62468d7b6f4d8af6758324b9ec983340b97 # Test: apply clang format
4919fa18ff7f9a4cdfdd7896d768c2342e5f9f37 # Surface: apply clang format
791fe029341aa1dda42376620d52c67ecaca7eea # Sketcher: Reformat to current clang-format standard
0a8292a850b98d2e66e08e235dfb81b6e7285df1 # Web: apply clang format
1a960286a4a549a6454155481ce51cad88a51745 # Tests: Reformat to current clang-format standard
c1825036a6dfd44576da6157bde9fa2fab724d55 # Tools: Reformat to current clang-format standard
17bf44ec9a5fd7a8f1c7bf0d3c24d63b6c808dbd # Start: apply clang format
89579cff6e8834e296d5efe6292f019fadedce53 # Addon Manager: Reformat with new Black line length
c989a8506ecc26e3172c0d18ce4d0f710b5c7d92 # RE: apply clang format
c6bc17ffc13aee4d38d2938800ef5002fc874fc3 # RE: apply clang format
6fb2bcafe85eb6bb0c625f37f233b0b09e093963 # MeshPart: apply clang format
c2bda2f75684ed8bb64813d4a92a5a595181f556 # MeshPart: apply clang format
ea116dc0332ccfc5797f248b04492a16f421b787 # Inspection: apply clang format
8d24f0c021a04f19f5463a52e3be1af60fb892f1 # Points: apply clang-formatting
e3de4f217c4f028523adcb5cb566f4d6a7957abe # minor reformat: break lines, one per item
d57d14321b408beef7b115331e2cfa7215f59b8a # Web: Final application of pre-commit
efd11e590d28d72e350b72f02f3f599ef4f704f4 # Test: Final application of pre-commit
217674de04533afb81da0968483dd5a6c4d88667 # Surface: Final application of pre-commit
70e046bbd5a7214b5d5ae8f12da5aed502dc89ab # Start: Final application of pre-commit
db24eeec535f1f43fb3d5b63d24c5171af637880 # RE: Final application of pre-commit
714cb0a309e243cfb035b046dd8cc543ac514cd2 # Points: Final application of pre-commit
7593f0c112198a0cf033a0bcf8d55db4e0a0e3f5 # MeshPart: Final application of pre-commit
b8f8b232cb0882d171cb299e6f6279a516cdd6eb # Inspection: Final application of pre-commit
c5c2ea3498f402c0c89916c46ddb071e22756622 # Assembly: Final application of pre-commit
592c992b863549fde52741fd8830418168387695 # Assembly: Apply pre-commit to Assembly files
94ca51b7799b2ac60a2a56d7e6e753bb97a73671 # PartDesign: Fix #9377 - issue with accuracy in AdditiveHelix (#11312)
d472927bba7b2d8d151c99fb29cf1d8dd099ea7d # Correct PartDesign Helix feature negative angles (#11399)
b93c02e07da4990482b9d927506901e6f5d624e1 # Black updated to 24.3.0
cbea6b60942f8327e6105b12e8c1d5db4647984c # FEM: Apply pre-commit to FEM files
+20
View File
@@ -0,0 +1,20 @@
#git archive --worktree-attributes --prefix=freecad-0.13/ --output=freecad.tar.gz HEAD
acinclude.m4 export-ignore
autogen.sh export-ignore
build.sh export-ignore
BuildAll.bat export-ignore
BuildRelease.ini export-ignore
BuildRelease.py export-ignore
configure.ac export-ignore
Makefile.am export-ignore
mkinstalldirs export-ignore
package export-ignore
fc.sh export-ignore
UpdateResources.bat export-ignore
BuildVersion.bat export-ignore
*.sln export-ignore
WindowsInstaller export-ignore
JtReader export-ignore
mefisto.patch export-ignore
Version.h.in export-subst
+1 -1
View File
@@ -9,4 +9,4 @@ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://wiki.freecad.org/Donate"]
custom: ["https://wiki.freecadweb.org/Donate"]
@@ -1,19 +0,0 @@
name: Request a Backport
description: Suggest that a commit from the main development branch be backported to the next point release
title: "[Backport] "
labels: ["needs triage", "backport"]
body:
- type: input
id: pull_request
attributes:
label: Original PR
description: A link to the PR that contains the commits to be backported
placeholder: https://github.com/FreeCAD/FreeCAD/pulls/1234
validations:
required: true
- type: textarea
id: description
attributes:
label: Description and Justification
description: Why should this PR (or individual commit) be backported?
placeholder: Please explain why this PR or commit should be backported to the next point release.
+91
View File
@@ -0,0 +1,91 @@
name: 🐛 Report a Bug
description: File a bug report
title: "[Bug] <title>"
labels: ["🐛 bug", "needs triage"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file a bug report! Please make sure you've posted about your issue in the FreeCAD Forums before submitting here.
- type: checkboxes
id: existing_issue
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: input
id: forum_link
attributes:
label: Forums discussion
description: Please start a discussion about your issue at [the FreeCAD Forum](https://forum.freecad.org) and wait for confirmation there before creating an issue
placeholder: Paste link to forum discussion here
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version of FreeCAD are you running?
options:
- 0.19 (Release)
- 0.20 (Development)
validations:
required: true
- type: textarea
id: full_version
attributes:
label: Full version info
description: Please use the About FreeCAD dialog to copy your full version information and paste it here.
render: shell
validations:
required: true
- type: dropdown
id: wb
attributes:
label: Subproject(s) affected?
options:
- Addon Manager
- Arch
- Core
- Draft
- Expressions
- FEM
- File formats
- GCS
- OpenSCAD
- Part
- PartDesign
- Path
- Project Tools & Websites
- Sketcher
- Spreadsheet
- Techdraw
- Other (specify in description)
- type: textarea
id: description
attributes:
label: Issue description
description: Please include as much detail as possible so that testers can reproduce the bug
placeholder: Description of the problem
validations:
required: true
- type: textarea
id: anything_else
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/master/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
@@ -0,0 +1,73 @@
name: 🌱 Feature Request
description: Submit an idea for a new feature
title: "[Feature Request] <title>"
labels: ["feature", "needs triage"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to request a feature! Please make sure you've posted about your idea in the FreeCAD Forums before submitting here.
- type: checkboxes
id: existing_issue
attributes:
label: Is there an existing request for this?
description: Please search to see if a request already exists for your suggestion
options:
- label: I have searched the existing requests
required: true
- type: input
id: forum_link
attributes:
label: Forums discussion
description: Please start a discussion about your idea at [the FreeCAD Forum](https://forum.freecad.org) and wait for confirmation there before creating a request.
placeholder: Paste link to forum discussion here
validations:
required: true
- type: dropdown
id: wb
attributes:
label: Subproject(s) affected?
options:
- Addon Manager
- Arch
- Core
- Draft
- Expressions
- FEM
- File formats
- GCS
- OpenSCAD
- Part
- PartDesign
- Path
- Project Tools & Websites
- Sketcher
- Spreadsheet
- Techdraw
- Other (specify in description)
- type: textarea
id: description
attributes:
label: Idea description
description: Please include as much detail as possible so that developers understand the request
placeholder: Description of the feature
validations:
required: true
- type: textarea
id: anything_else
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about your idea.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/master/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
-71
View File
@@ -1,71 +0,0 @@
name: Report a Problem
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
labels: ["Status: Needs triage"]
body:
- type: checkboxes
id: existing_issue
attributes:
label: Is there an existing issue for this?
description: Please [search](https://github.com/FreeCAD/FreeCAD/issues) to see if a similar issue already exists for the problem you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: description
attributes:
label: Problem description
description: Describe the problem and how it impacts user experience, workflow, maintainability or speed of the code. If the problem appears to be a bug with the current functionality, provide as test case or recipe that reproduces the error. Ideally record a macro and attach it.
placeholder: Description of the problem
validations:
required: true
- type: textarea
id: full_version
attributes:
label: Full version info
description: Please use the About FreeCAD dialog to copy your full version information and paste it here.
render: shell
validations:
required: true
- type: dropdown
id: wb
attributes:
label: Subproject(s) affected?
options:
- Addon Manager
- Assembly
- BIM
- CAM
- Core
- Draft
- Expressions
- FEM
- File formats
- Mesh
- OpenSCAD
- Part
- PartDesign
- Project Tools & Websites
- Sketcher
- Spreadsheet
- TechDraw
- Other (specify in description)
- type: textarea
id: anything_else
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
If there is a discussion about the problem on the forum, provide link(s) here.
You can upload or copy your macro here to speed up the diagnosis and debugging.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
+1 -1
View File
@@ -2,4 +2,4 @@ blank_issues_enabled: false
contact_links:
- name: 💬 START HERE -- FreeCAD Forum
url: https://forum.freecad.org/
about: You are encouraged to discuss the problem you are seeing on the FreeCAD Forums before opening an issue on GitHub
about: Please start a topic at the forums first and wait for others to confirm your issue before creating a bug report on GitHub
+14
View File
@@ -0,0 +1,14 @@
Thank you for creating a pull request to contribute to FreeCAD! To ease integration, we ask you to conform to the following items. Pull requests which don't satisfy all the items below might be rejected. If you are in doubt with any of the items below, don't hesitate to ask for help in the [FreeCAD forum](https://forum.freecadweb.org/viewforum.php?f=10)!
- [ ] Your pull request is confined strictly to a single module. That is, all the files changed by your pull request are either in `App`, `Base`, `Gui` or one of the `Mod` subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next ones
- [ ] In case your pull request does more than just fixing small bugs, make sure you discussed your ideas with other developers on the FreeCAD forum
- [ ] Your branch is [rebased](https://git-scm.com/docs/git-rebase) on latest master `git pull --rebase upstream master`
- [ ] All FreeCAD unit tests are confirmed to pass by running `./bin/FreeCAD --run-test 0`
- [ ] All commit messages are [well-written](https://chris.beams.io/posts/git-commit/) ex: `Fixes typo in Draft Move command text`
- [ ] Your pull request is well written and has a good description, and its title starts with the module name, ex: `Draft: Fixed typos`
- [ ] Commit messages include `issue #<id>` or `fixes #<id>` where `<id>` is the issue ID number from our [Issues database](https://github.com/FreeCAD/FreeCAD/issues) in case a particular commit solves or is related to an existing issue. Ex: `Draft: fix typos - fixes #4805`
And please remember to update the Wiki with the features added or changed once this PR is merged.
**Note**: If you don't have wiki access, then please mention your contribution on the [0.20 Changelog Forum Thread](https://forum.freecadweb.org/viewtopic.php?f=10&t=56135).
---
-7
View File
@@ -7,7 +7,6 @@ alocation
anid
anormal
apoints
aply
appy
ba
beginn
@@ -33,9 +32,7 @@ froms
hist
indicies
inout
isnt
ist
itsel
lod
mantatory
mata
@@ -46,7 +43,6 @@ nin
normale
normaly
numer
oce
ontop
ot
parm
@@ -58,7 +54,6 @@ recurrance
rougly
seh
serie
siz
som
strack
substraction
@@ -67,11 +62,9 @@ te
thist
tread
ue
upto
uptodate
usind
vas
vertexes
vew
wallthickness
zuser
Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 570 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 KiB

+39 -81
View File
@@ -2,104 +2,62 @@
# source:
# - any: ['src/**/*', '!src/docs/*']
# 'Mod' related labels
"Mod: Core":
- changed-files:
- any-glob-to-any-file: ['src/App/**/*', 'src/Base/**/*', 'src/Gui/**/*']
Core:
- 'src/App/**/*'
- 'src/Base/**/*'
- 'src/Gui/**/*'
:octocat::
- changed-files:
- any-glob-to-any-file: ['.github/**/*']
- '.github/**/*'
"Mod: Addon Manager":
- changed-files:
- any-glob-to-any-file: ['src/Mod/AddonManager/**/*']
Addon Manager:
- 'src/Mod/AddonManager/**/*'
"Mod: Materials":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Material/**/*']
WB Arch:
- 'src/Mod/Arch/**/*'
"Mod: Measurement":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Measure/**/*']
WB Draft:
- 'src/Mod/Draft/**/*'
"Mod: BIM":
- changed-files:
- any-glob-to-any-file: ['src/Mod/BIM/**/*']
WB FEM:
- 'src/Mod/Fem/**/*'
"Mod: Assembly":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Assembly/**/*']
WB Mesh:
- 'src/Mod/Mesh/**/*'
"Mod: Draft":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Draft/**/*']
WB MeshPart:
- 'src/Mod/MeshPart/**/*'
"Mod: FEM":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Fem/**/*']
WB OpenSCAD:
- 'src/Mod/OpenSCAD/**/*'
"Mod: Mesh":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Mesh/**/*']
WB Part:
- 'src/Mod/Part/**/*'
"Mod: MeshPart":
- changed-files:
- any-glob-to-any-file: ['src/Mod/MeshPart/**/*']
WB PartDesign:
- 'src/Mod/PartDesign/**/*'
"Mod: OpenSCAD":
- changed-files:
- any-glob-to-any-file: ['src/Mod/OpenSCAD/**/*']
WB Path:
- 'src/Mod/Path/**/*'
"Mod: Part":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Part/**/*']
WB Points:
- 'src/Mod/Points/**/*'
"Mod: Part Design":
- changed-files:
- any-glob-to-any-file: ['src/Mod/PartDesign/**/*']
WB ReverseEngineering:
- 'src/Mod/ReverseEngineering/**/*'
"Mod: CAM":
- changed-files:
- any-glob-to-any-file: ['src/Mod/CAM/**/*']
WB Sketcher:
- 'src/Mod/Sketcher/**/*'
"Mod: Points":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Points/**/*']
WB Spreadsheet:
- 'src/Mod/Spreadsheet/**/*'
"Mod: Reverse Engineering":
- changed-files:
- any-glob-to-any-file: ['src/Mod/ReverseEngineering/**/*']
WB Surface:
- 'src/Mod/Surface/**/*/'
"Mod: Sketcher":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Sketcher/**/*']
WB TechDraw:
- 'src/Mod/TechDraw/**/*'
"Mod: Spreadsheet":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Spreadsheet/**/*']
WB Test:
- 'src/Mod/Test/**/*'
"Mod: Surface":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Surface/**/*/']
"Mod: TechDraw":
- changed-files:
- any-glob-to-any-file: ['src/Mod/TechDraw/**/*']
"Mod: Test":
- changed-files:
- any-glob-to-any-file: ['src/Mod/Test/**/*']
# 'Packaging' related labels
"Packaging/building":
- changed-files:
- any-glob-to-any-file: ['cMake/**/*']
# 'Topic' related labels
"Topic: Stylesheets":
- changed-files:
- any-glob-to-any-file: ['src/Gui/Stylesheets/**/*']
-18
View File
@@ -1,18 +0,0 @@
{
"__comment": "Taken from vscode-cpptools's Extension/package.json gcc rule",
"problemMatcher": [
{
"owner": "gcc-problem-matcher",
"pattern": [
{
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
-19
View File
@@ -1,19 +0,0 @@
{
"__comment": "Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule",
"problemMatcher": [
{
"owner": "msvc-problem-matcher",
"pattern": [
{
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6
}
]
}
]
}
-110
View File
@@ -1,110 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This workflow is a complementary one to the master CI.
# It aims at doing cleanup operations after a CI workflow ran.
# Being triggered when the master workflow ends allows it to run with necessary privileges.
# Indeed it always run with push-like rights even for PR events.
# In order to work, this cleanup workflow imposes name formatting for caches
# Caches that have to be cleaned (typically compiler caches) shall be named as below :
# ${MARK}-${CONTEXT}-${REF}-${ID}
# with :
# ${MARK} => A mark identifying a cache to be cleaned, defined as being "FC" (without quotes)
# ${CONTEXT} => A string identifying cache saving context, typically OS name or compiler name
# ${REF} => The full reference of the branch owning the cache (starting with "/refs/pull/" or "/refs/heads/")
# ${ID} => A cache unique identifier, generally an ascending number, in no case containing a '-' (hyphen) sign
name: FreeCAD CI cleaner
on:
workflow_run:
workflows: [FreeCAD master CI]
types:
- completed
env:
dryrun: false
concurrency:
group: FC-CI-cleaner
cancel-in-progress: false
jobs:
CachesCleanup:
runs-on: ubuntu-latest
env:
logdir: /tmp/log/
steps:
- name: Make needed directories
run: |
mkdir -p ${{ env.logdir }}
- name: Get existing caches for the repo
run: |
curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches > ${{ env.logdir }}caches.json
- name: Extract pull request caches
run: |
# Extract caches of which names starts with MARK and contains "/refs/pull/"
jq ".actions_caches | map(select(.key | startswith(\"FC-\"))) | map(select(.key | contains(\"refs/pull/\")))" ${{ env.logdir }}caches.json > ${{ env.logdir }}pulls.json
- name: Extract and delete pull request obsolete cache IDs
run: |
# Group the caches by MARK-CONTEXT-REF, sort by ascending last access datetime and keep all but the last as to be deleted
# As a consequence, for pull requests, only the most recent cache is kept (one for each context and for each PR)
PRID=$(jq "group_by(.key | .[:rindex(\"-\")]) | .[] | sort_by(.last_accessed_at) | .[:-1][].id" ${{ env.logdir }}pulls.json)
for id in $PRID
do
echo "Trying to delete pull request obsolete cache ID : $id"
if [ ${{ env.dryrun }} == "false" ]
then
curl -X DELETE -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id
else
echo "DRYRUN: executing : curl -X DELETE -H \"Accept: application/vnd.github+json\" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id"
fi
done
- name: Extract push caches
run: |
# Extract caches of which names starts with MARK and contains "/refs/heads/"
jq ".actions_caches | map(select(.key | startswith(\"FC-\"))) | map(select(.key | contains(\"refs/heads/\")))" ${{ env.logdir }}caches.json > ${{ env.logdir }}pushes.json
- name: Extract and delete push obsolete cache IDs
run: |
# Group the caches by MARK-CONTEXT-REF, sort by ascending last access datetime, keep all but the last 2 and keep all accessed for more than 1 hour as to be deleted
# As a consequence, for pushes (repo branches), at least 2 caches (for each context and for each branch) are kept, others are deleted if they have been useless for more than 1 hour
PSID=$(jq "group_by(.key | .[:rindex(\"-\")]) | .[] | sort_by(.last_accessed_at) | .[:-2][] | select((.last_accessed_at | if contains(\".\") then .[:rindex(\".\")]+\"Z\" else . end | fromdateiso8601) < (now | floor - 3600)) | .id" ${{ env.logdir }}pushes.json)
for id in $PSID
do
echo "Trying to delete push obsolete cache ID : $id"
if [ ${{ env.dryrun }} == "false" ]
then
curl -X DELETE -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id
else
echo "DRYRUN: executing : curl -X DELETE -H \"Accept: application/vnd.github+json\" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id"
fi
done
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-Logs
path: |
${{ env.logdir }}
-94
View File
@@ -1,94 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This is the master workflow for CI of FreeCAD.
# It (only) aims at properly organizing the sub-workflows.
name: FreeCAD master CI
on: [workflow_dispatch, push, pull_request]
concurrency:
group: FC-CI-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
Prepare:
uses: ./.github/workflows/sub_prepare.yml
with:
artifactBasename: Prepare-${{ github.run_id }}
Pixi:
needs: [Prepare]
uses: ./.github/workflows/sub_buildPixi.yml
with:
artifactBasename: Pixi-${{ github.run_id }}
MacOS_13_Conda_Apple:
needs: [Prepare]
uses: ./.github/workflows/sub_buildMacOSCondaApple.yml
with:
artifactBasename: MacOS_13_Conda_Apple-${{ github.run_id }}
Ubuntu_20-04:
needs: [Prepare]
uses: ./.github/workflows/sub_buildUbuntu2004.yml
with:
artifactBasename: Ubuntu_20-04-${{ github.run_id }}
Ubuntu_24-04_Conda:
needs: [Prepare]
uses: ./.github/workflows/sub_buildUbuntu2404Conda.yml
with:
artifactBasename: Ubuntu_24-04_Conda-${{ github.run_id }}
Windows:
needs: [Prepare]
uses: ./.github/workflows/sub_buildWindows.yml
with:
artifactBasename: Windows-${{ github.run_id }}
Lint:
needs: [Prepare]
uses: ./.github/workflows/sub_lint.yml
with:
artifactBasename: Lint-${{ github.run_id }}
changedFiles: ${{ needs.Prepare.outputs.changedFiles }}
changedCppFiles: ${{ needs.Prepare.outputs.changedCppFiles }}
changedPythonFiles: ${{ needs.Prepare.outputs.changedPythonFiles }}
WrapUp:
needs: [
Prepare,
Pixi,
MacOS_13_Conda_Apple,
Ubuntu_20-04,
Ubuntu_24-04_Conda,
Windows,
Lint
]
if: always()
uses: ./.github/workflows/sub_wrapup.yml
with:
previousSteps: ${{ toJSON(needs) }}
@@ -1,74 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: build
description: "Linux: build application"
inputs:
builddir:
description: "Directory where build will happen"
required: true
logFile:
description: "Path for log file"
required: true
errorFile:
description: "Path to error file"
required: true
reportFile:
description: "Path for report file"
required: true
extraParameters:
description: "Extra parameters to CMake build"
required: false
runs:
using: "composite"
steps:
- name: Build
id: build
shell: bash -l {0}
run: |
set -o pipefail
(stdbuf -oL -eL cmake --build ${{ inputs.builddir }} -j$(nproc) ${{ inputs.extraParameters }}) \
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
- name: Write report
shell: bash -l {0}
if: always()
run: |
if [ ${{ steps.build.outcome }} == 'success' ]
then
echo "<details><summary>:heavy_check_mark: CMake build succeeded</summary>" >> ${{ inputs.reportFile }}
else
echo "<details><summary>:fire: CMake build failed</summary>" >> ${{ inputs.reportFile }}
fi
echo "" >> ${{ inputs.reportFile }}
echo "Build Error Log (stderr output):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "</details>">> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -1,79 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: configure
description: "Linux: configure CMake"
inputs:
sourcedir:
description: "Directory where sources are stored"
required: false
default: ./
builddir:
description: "Directory where build will happen"
required: true
logFile:
description: "Path for log file"
required: true
errorFile:
description: "Path to error file"
required: true
reportFile:
description: "Path for report file"
required: true
extraParameters:
description: "Extra parameters to CMake configure"
required: false
runs:
using: "composite"
steps:
- name: Configure CMake
id: configure
shell: bash -l {0}
run: |
set -o pipefail
(stdbuf -oL -eL cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
- name: Write report
shell: bash -l {0}
if: always()
run: |
if [ ${{ steps.configure.outcome }} == 'success' ]
then
echo "<details><summary>:heavy_check_mark: CMake configure succeeded</summary>" >> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
echo "Configure Error Log (stderr output):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
else
echo "<details><summary>:fire: CMake configure failed</summary>" >> ${{ inputs.reportFile }}
fi
echo "" >> ${{ inputs.reportFile }}
echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "</details>">> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -1,47 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: generateCacheKey
description: "Linux: generates a cache key taking into account distro and compiler"
inputs:
compiler:
description: "Binary name/path of compiler to be used"
required: true
qt_major_version:
description: "Major version number of qt to be used"
required: true
outputs:
cacheKey:
description: "Cache key with distro and compiler version"
value: ${{ steps.generateCacheKey.outputs.cacheKey }}
runs:
using: "composite"
steps:
- id: generateCacheKey
shell: bash -l {0}
run: |
cacheKey=$(lsb_release -ds | tr -d ' ')-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)-qt${{ inputs.qt_major_version }}
echo "Generated cache key : $cacheKey"
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
@@ -1,74 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: install
description: "Linux: install application"
inputs:
builddir:
description: "Directory where build is stored"
required: true
logFile:
description: "Path for log file"
required: true
errorFile:
description: "Path to error file"
required: true
reportFile:
description: "Path for report file"
required: true
extraParameters:
description: "Extra parameters to CMake install"
required: false
runs:
using: "composite"
steps:
- name: Install
id: install
shell: bash -l {0}
run: |
set -o pipefail
(stdbuf -oL -eL sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
- name: Write report
shell: bash -l {0}
if: always()
run: |
if [ ${{ steps.install.outcome }} == 'success' ]
then
echo "<details><summary>:heavy_check_mark: CMake install succeeded</summary>" >> ${{ inputs.reportFile }}
else
echo "<details><summary>:fire: CMake install failed</summary>" >> ${{ inputs.reportFile }}
fi
echo "" >> ${{ inputs.reportFile }}
echo "Install Error Log (stderr output):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "Install Error Log (stdout output trimmed to the last 100 Lines):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
tail -n 100 ${{ inputs.logFile }} >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "</details>">> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -1,73 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: build
description: "macOS: build application"
inputs:
builddir:
description: "Directory where build will happen"
required: true
logFile:
description: "Path for log file"
required: true
errorFile:
description: "Path to error file"
required: true
reportFile:
description: "Path for report file"
required: true
extraParameters:
description: "Extra parameters to CMake build"
required: false
runs:
using: "composite"
steps:
- name: Build
id: build
shell: bash -l {0}
run: |
(cmake --build ${{ inputs.builddir }} -j$(nproc) ${{ inputs.extraParameters }}) \
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
- name: Write report
shell: bash -l {0}
if: always()
run: |
if [ ${{ steps.build.outcome }} == 'success' ]
then
echo "<details><summary>:heavy_check_mark: CMake build succeeded</summary>" >> ${{ inputs.reportFile }}
else
echo "<details><summary>:fire: CMake build failed</summary>" >> ${{ inputs.reportFile }}
fi
echo "" >> ${{ inputs.reportFile }}
echo "Build Error Log (stderr output):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "</details>">> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -1,78 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: configure
description: "macOS: configure CMake"
inputs:
sourcedir:
description: "Directory where sources are stored"
required: false
default: ./
builddir:
description: "Directory where build will happen"
required: true
logFile:
description: "Path for log file"
required: true
errorFile:
description: "Path to error file"
required: true
reportFile:
description: "Path for report file"
required: true
extraParameters:
description: "Extra parameters to CMake configure"
required: false
runs:
using: "composite"
steps:
- name: Configure CMake
id: configure
shell: bash -l {0}
run: |
(cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
- name: Write report
shell: bash -l {0}
if: always()
run: |
if [ ${{ steps.configure.outcome }} == 'success' ]
then
echo "<details><summary>:heavy_check_mark: CMake configure succeeded</summary>" >> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
echo "Configure Error Log (stderr output):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
else
echo "<details><summary>:fire: CMake configure failed</summary>" >> ${{ inputs.reportFile }}
fi
echo "" >> ${{ inputs.reportFile }}
echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "</details>">> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -1,44 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: generateCacheKey
description: "macOS: generates a cache key taking into account distro and compiler"
inputs:
compiler:
description: "Binary name/path of compiler to be used"
required: true
outputs:
cacheKey:
description: "Cache key with distro and compiler version"
value: ${{ steps.generateCacheKey.outputs.cacheKey }}
runs:
using: "composite"
steps:
- id: generateCacheKey
shell: bash -l {0}
run: |
cacheKey=$(sw_vers --productName)-$(sw_vers --productVersion)-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)
echo "Generated cache key : $cacheKey"
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
@@ -1,73 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: install
description: "macOS: install application"
inputs:
builddir:
description: "Directory where build is stored"
required: true
logFile:
description: "Path for log file"
required: true
errorFile:
description: "Path to error file"
required: true
reportFile:
description: "Path for report file"
required: true
extraParameters:
description: "Extra parameters to CMake install"
required: false
runs:
using: "composite"
steps:
- name: Install
id: install
shell: bash -l {0}
run: |
(sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
- name: Write report
shell: bash -l {0}
if: always()
run: |
if [ ${{ steps.install.outcome }} == 'success' ]
then
echo "<details><summary>:heavy_check_mark: CMake install succeeded</summary>" >> ${{ inputs.reportFile }}
else
echo "<details><summary>:fire: CMake install failed</summary>" >> ${{ inputs.reportFile }}
fi
echo "" >> ${{ inputs.reportFile }}
echo "Install Error Log (stderr output):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "Install Error Log (stdout output trimmed to the last 100 Lines):" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
tail -n 100 ${{ inputs.logFile }} >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
echo "</details>">> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -1,141 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 The FreeCAD Project Association *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# !!! Each step running a single test shall have an'id' defined so its report will be output
name: Run all C++ Tests
description: "Run all C++ tests, generating logs and reports for each"
inputs:
reportdir:
description: "Report directory where logs will be stored"
required: true
builddir:
description: "Build directory where tests are located"
required: true
reportFile:
description: "Path for report file"
required: true
runs:
using: "composite"
steps:
- name: C++ Assembly tests
id: assembly
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Assembly_tests_run --gtest_output=json:${{ inputs.reportdir }}assembly_gtest_results.json
testLogFile: ${{ inputs.reportdir }}assembly_gtest_test_log.txt
testName: Assembly
- name: C++ core tests
id: core
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Tests_run --gtest_output=json:${{ inputs.reportdir }}core_gtest_results.json
testLogFile: ${{ inputs.reportdir }}core_gtest_test_log.txt
testName: Core
- name: C++ Material tests
id: material
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Material_tests_run --gtest_output=json:${{ inputs.reportdir }}material_gtest_results.json
testLogFile: ${{ inputs.reportdir }}material_gtest_test_log.txt
testName: Material
- name: C++ Measure tests
id: measure
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Material_tests_run --gtest_output=json:${{ inputs.reportdir }}measure_gtest_results.json
testLogFile: ${{ inputs.reportdir }}measure_gtest_test_log.txt
testName: Measure
- name: C++ Mesh tests
id: mesh
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Mesh_tests_run --gtest_output=json:${{ inputs.reportdir }}mesh_gtest_results.json
testLogFile: ${{ inputs.reportdir }}mesh_gtest_test_log.txt
testName: Mesh
- name: C++ MeshPart tests
id: meshpart
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Mesh_tests_run --gtest_output=json:${{ inputs.reportdir }}meshpart_gtest_results.json
testLogFile: ${{ inputs.reportdir }}meshpart_gtest_test_log.txt
testName: MeshPart
- name: C++ Part tests
id: part
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Part_tests_run --gtest_output=json:${{ inputs.reportdir }}part_gtest_results.json
testLogFile: ${{ inputs.reportdir }}Part_gtest_test_log.txt
testName: Part
- name: C++ PartDesign tests
id: partdesign
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/PartDesign_tests_run --gtest_output=json:${{ inputs.reportdir }}partdesign_gtest_results.json
testLogFile: ${{ inputs.reportdir }}PartDesign_gtest_test_log.txt
testName: PartDesign
- name: C++ Points tests
id: points
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Points_tests_run --gtest_output=json:${{ inputs.reportdir }}points_gtest_results.json
testLogFile: ${{ inputs.reportdir }}points_gtest_test_log.txt
testName: Points
- name: C++ Sketcher tests
id: sketcher
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}sketcher_gtest_results.json
testLogFile: ${{ inputs.reportdir }}sketcher_gtest_test_log.txt
testName: Sketcher
- name: C++ Spreadsheet tests
id: spreadsheet
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
with:
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}spreadsheet_gtest_results.json
testLogFile: ${{ inputs.reportdir }}spreadsheet_gtest_test_log.txt
testName: Spreadsheet
- name: Compose summary report based on test results
if: always()
shell: bash -l {0}
run: |
# Print global result
if [ ${{ job.status }} != "success" ]
then
echo "<details><summary>:fire: C++ tests failed</summary>" >> ${{ inputs.reportFile }}
else
echo "<details><summary>:heavy_check_mark: C++ tests succeeded</summary>" >> ${{ inputs.reportFile }}
fi
echo "" >> ${{ inputs.reportFile }}
echo "<blockquote>" >> ${{ inputs.reportFile }}
#Extract individual results
cat > /tmp/data << "EOD"
${{ toJSON(steps) }}
EOD
echo "$(jq -r ".[].outputs.reportText" /tmp/data)" >> ${{ inputs.reportFile }}
# Close report
echo "</blockquote>" >> ${{ inputs.reportFile }}
echo "</details>" >> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -1,74 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * Copyright (c) 2023 FreeCAD Project Association *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: runCPPTests
description: "Run C++ tests, generate log and report"
inputs:
testCommand:
description: "Test command to be run"
required: true
testLogFile:
description: "Path for the command-line output of the tests"
required: true
testName:
description: "A descriptive name for the test suite"
required: true
outputs:
reportText:
description: "Report text"
value: ${{ steps.report.outputs.reportText }}
runs:
using: "composite"
steps:
- name: Run C++ tests
shell: bash -l {0}
run: |
set -o pipefail
${{ inputs.testCommand }} | tee -a ${{ inputs.testLogFile }}
- name: Parse test results
if: always()
id: report
shell: bash -l {0}
run: |
result=$(sed -ne "/Global test environment tear-down/,/^$/{/^$/d;p}" ${{ inputs.testLogFile }})
if grep -qF "[ FAILED ]" <<< $result
then
reportText="<details><summary>:fire: GTest C++ test suite '${{ inputs.testName }}' failed</summary>\n"
else
reportText="<details><summary>:heavy_check_mark: GTest C++ test suite '${{ inputs.testName }}' succeeded</summary>\n"
fi
reportText+="\n"
reportText+="Results\n"
reportText+="\n"
reportText+='```\n'
reportText+="$result\n"
reportText+='```\n'
reportText+="</details>\n"
reportText+="\n"
echo "reportText<<EOD" >> $GITHUB_OUTPUT
echo -e "$reportText" >> $GITHUB_OUTPUT
echo "EOD" >> $GITHUB_OUTPUT
echo -e "$reportText"
@@ -1,82 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
name: runPythonTests
description: "Run Python tests, generate log and report"
inputs:
testDescription:
description: "Test description text, will be used on report"
required: true
testCommand:
description: "Test command to be run"
required: true
logFile:
description: "Path for log file"
required: true
reportFile:
description: "Path for report file"
required: true
runs:
using: "composite"
steps:
- name: Run tests
id: runTests
shell: bash -l {0}
run: |
set -o pipefail
${{ inputs.testCommand }} | sed -Ee "/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d" | tee -a ${{ inputs.logFile }}
- name: Write report
shell: bash -l {0}
if: always()
run: |
sed -ne "/^\(FAILED\|ERROR\):/,/^[[:blank:]]*$/bF; /^Traceback/,/^[^[:blank:]]/{/^Traceback/bT; /^[^[:blank:]]/G; bT}; b; :T w ${{ inputs.logFile }}_tracebacks" -e "b; :F w ${{ inputs.logFile }}_failedtests" ${{ inputs.logFile }}
icon=""
if [ $( cat ${{ inputs.logFile }}_tracebacks | wc -l ) -gt 0 ]
then
icon=" :fire:"
fi
if [ ${{ steps.runTests.outcome }} == 'success' ]
then
echo "<details><summary>:heavy_check_mark: ${{ inputs.testDescription }} succeeded$icon</summary>" >> ${{ inputs.reportFile }}
else
echo "<details><summary>:fire: ${{ inputs.testDescription }} failed$icon</summary>" >> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
echo "Failed tests" >> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.logFile }}_failedtests >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
fi
echo "" >> ${{ inputs.reportFile }}
if [ $( cat ${{ inputs.logFile }}_tracebacks | wc -l ) -gt 0 ]
then
echo "Uncaught tracebacks -- these tracebacks appeared during test but didn't fail a test --" >> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
cat ${{ inputs.logFile }}_tracebacks >> ${{ inputs.reportFile }}
echo '```' >> ${{ inputs.reportFile }}
fi
echo "</details>">> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -1,78 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This action aims at speeding up CI and reduce dependency to external resources
# by creating a cache of Ccache needed binaries then using it for CI runs rather
# than downloading every time.
#
# If it needs to be updated to another version, the process it to change
# 'downloadpath' and 'version' inputs below then delete the existing cache
# from Github interface so a new one is generated using new values.
name: getCcache
description: "Windows: tries to get a cached version of Ccache and create one if fails"
inputs:
ccachebindir:
description: "Directory where ccache binaries shall be stored"
required: true
# Below inputs shall generally not be provided as they won't be used if a cached version exists
# They are mainly used because Github do not support adding env variables in a composite action
ccachedownloadpath:
description: "Path where to download ccache"
required: false
default: https://github.com/ccache/ccache/releases/download/v4.9/
ccacheversion:
description: "Ccache version to be downloaded"
required: false
default: ccache-4.9-windows-x86_64
runs:
using: "composite"
steps:
- name: Create destination directory
shell: bash
run: |
mkdir -p ${{ inputs.ccachebindir }}
- name: Get cached version
uses: actions/cache/restore@v4
id: getCached
with:
path: ${{ inputs.ccachebindir }}
key: ccacheforwin-${{ inputs.ccacheversion }}
- name: Download ccache
shell: bash
if: steps.getCached.outputs.cache-hit != 'true'
run: |
curl -L -o ccache.zip ${{ inputs.ccachedownloadpath }}${{ inputs.ccacheversion }}.zip
7z x ccache.zip -o"ccachetemp" -r -y
cp -a ccachetemp/${{ inputs.ccacheversion }}/ccache.exe ${{ inputs.ccachebindir }}
cp -a ccachetemp/${{ inputs.ccacheversion }}/ccache.exe ${{ inputs.ccachebindir }}/cl.exe
rm ccache.zip
rm -rf ccachetemp
- name: Save version to cache
if: steps.getCached.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ inputs.ccachebindir }}
key: ${{ steps.getCached.outputs.cache-primary-key }}
@@ -1,76 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This action aims at speeding up CI and reduce dependency to external resources
# by creating a cache of Libpack needed files then using it for CI runs rather
# than downloading every time.
#
# If it needs to be updated to another version, the process it to change
# 'downloadpath' and 'version' inputs below then delete the existing cache
# from Github interface so a new one is generated using new values.
name: getLibpack
description: "Windows: tries to get a cached version of Libpack and create one if fails"
inputs:
libpackdir:
description: "Directory where libpack files shall be stored"
required: true
# Below inputs shall generally not be provided as they won't be used if a cached version exists
# They are mainly used because Github do not support adding env variables in a composite action
libpackdownloadurl:
description: "URL where to download libpack"
required: false
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/3.0.0RC4/LibPack-1.0.0-v3.0.0RC4-Release.7z
libpackname:
description: "Libpack name (once downloaded)"
required: false
default: LibPack-1.0.0-v3.0.0RC4-Release
runs:
using: "composite"
steps:
- name: Create destination directory
shell: bash
run: |
mkdir -p ${{ inputs.libpackdir }}
- name: Get cached version
uses: actions/cache/restore@v4
id: getCached
with:
path: ${{ inputs.libpackdir }}
key: libpackforwin-${{ inputs.libpackname }}
- name: Download libpack
shell: bash
if: steps.getCached.outputs.cache-hit != 'true'
run: |
curl -L -o libpack.7z ${{ inputs.libpackdownloadurl }}
7z x libpack.7z -o"libpacktemp" -r -y
mv libpacktemp/${{ inputs.libpackname }}/* ${{ inputs.libpackdir }}
rm -rf libpacktemp
- name: Save version to cache
if: steps.getCached.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ inputs.libpackdir }}
key: ${{ steps.getCached.outputs.cache-primary-key }}
File diff suppressed because it is too large Load Diff
-44
View File
@@ -1,44 +0,0 @@
name: Monthly issue metrics
on:
workflow_dispatch:
schedule:
- cron: '0 0 15 * *'
permissions:
issues: write
pull-requests: read
jobs:
build:
name: issue metrics
runs-on: ubuntu-latest
if: github.repository_owner == 'FreeCAD'
steps:
- name: Get dates for last month
shell: bash
run: |
# Calculate the first day of the previous month
first_day=$(date -d "last month" +%Y-%m-15)
# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
#Set an environment variable with the date range
echo "$first_day..$last_day"
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
- name: Run issue-metrics tool
uses: github/issue-metrics@v3
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:FreeCAD/FreeCAD is:issue created:${{ env.last_month }}'
- name: Create issue
uses: peter-evans/create-issue-from-file@v4
with:
title: Monthly issue metrics report
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md
assignees: maxwxyz
+2 -2
View File
@@ -17,8 +17,8 @@ jobs:
pull-requests: write
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: ".github/labels.yml"
sync-labels: false
sync-labels: false
@@ -1,172 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This is a build and test workflow for CI of FreeCAD.
# This workflow aims at building and testing FreeCAD on a Conda environment on macOS.
name: Build macOS 13 (Apple Silicon)
on:
workflow_call:
inputs:
artifactBasename:
type: string
required: true
testOnBuildDir:
default: false
type: boolean
required: false
allowedToFail:
default: false
type: boolean
required: false
outputs:
reportFile:
value: ${{ jobs.Build.outputs.reportFile }}
jobs:
Build:
runs-on: macos-14
continue-on-error: ${{ inputs.allowedToFail }}
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
CCACHE_MAXSIZE: 1G
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 1
CC: arm64-apple-darwin20.0.0-clang
CXX: arm64-apple-darwin20.0.0-clang++
builddir: ${{ github.workspace }}/build/release/
logdir: /tmp/logs/
reportdir: /tmp/report/
reportfilename: ${{ inputs.artifactBasename }}-report.md
defaults:
run:
shell: bash -l {0}
outputs:
reportFile: ${{ steps.Init.outputs.reportFile }}
steps:
- name: Checking out source code
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Miniconda
env:
CONDA_VERBOSITY: 2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: .conda/freecad
environment-file: conda/conda-env.yaml
channels: conda-forge
channel-priority: true
miniforge-version: latest
conda-remove-defaults: "true"
- name: Install FreeCAD dependencies
env:
CONDA_VERBOSITY: 2
run: |
./conda/setup-environment.sh
- name: Set Environment Variables
run: |
echo "CC=$CC" >> "$GITHUB_ENV"
echo "CXX=$CXX" >> "$GITHUB_ENV"
- name: Make needed directories, files and initializations
id: Init
run: |
mkdir -p ${{ env.CCACHE_DIR }}
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
mkdir -p ${{ env.builddir }}
mkdir -p ${{ env.logdir }}
mkdir -p ${{ env.reportdir }}
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- name: Generate cache key
id: genCacheKey
uses: ./.github/workflows/actions/macos/generateCacheKey
with:
compiler: ${{ env.CXX }}
- name: Restore Compiler Cache
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
- name: Print CCache statistics before build, reset stats and print config
run: |
ccache -s
ccache -z
ccache -p
- name: CMake Configure
run: |
mamba run --live-stream -p .conda/freecad cmake --preset conda-macos-release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
- name: CMake Build
run: |
mamba run --live-stream -p .conda/freecad cmake --build build/release
- name: Print ccache statistics after Build
run: |
ccache -s
- name: FreeCAD CLI tests on build dir
if: inputs.testOnBuildDir
timeout-minutes: 10
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on build dir"
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: C++ tests
timeout-minutes: 1
uses: ./.github/workflows/actions/runCPPTests/runAllTests
with:
reportdir: ${{ env.reportdir }}
builddir: ${{ env.builddir }}
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
- name: CMake Install
run: |
mamba run --live-stream -p .conda/freecad cmake --install build/release
- name: FreeCAD CLI tests on install
timeout-minutes: 10
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on install"
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
/var/crash/*FreeCAD*
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ env.reportfilename }}
path: |
${{env.reportdir}}${{ env.reportfilename }}
-218
View File
@@ -1,218 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2024 0penBrain, Lorenz Lechner and Jacob Oursland. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This is a build and test workflow for CI of FreeCAD.
# This workflow aims at building and testing FreeCAD on a Conda environment on macOS.
name: Pixi Builds
on:
workflow_call:
inputs:
artifactBasename:
type: string
required: true
testOnBuildDir:
default: false
type: boolean
required: false
allowedToFail:
default: false
type: boolean
required: false
outputs:
reportFile:
value: ${{ jobs.Build.outputs.reportFile }}
jobs:
build_with_pixi:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ inputs.allowedToFail }}
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
CCACHE_MAXSIZE: 1G
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 5
builddir: ${{ github.workspace }}/build/
cacheKey: pixi-${{ matrix.os }}
logdir: ${{ github.workspace }}/logs/
reportdir: ${{ github.workspace }}/report/
reportfilename: ${{ inputs.artifactBasename }}-${{ matrix.os }}-report.md
outputs:
reportFile: ${{ steps.Init.outputs.reportFile }}
strategy:
max-parallel: 6
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Set Platform Environment Variables
shell: bash -l {0}
env:
OPERATING_SYSTEM: ${{ runner.os }}
run: |
if [[ $OPERATING_SYSTEM == 'Windows' ]]; then
echo 'CCACHE_COMPILERCHECK=%compiler%' >> "$GITHUB_ENV"
else
echo 'CCACHE_COMPILERCHECK=%compiler% -dumpfullversion -dumpversion' >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v4
- name: Add GCC Problem Matcher
if: runner.os == 'Linux'
run: |
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/gcc.json"
- name: Add Clang Problem Matcher
if: runner.os == 'macOS'
run: |
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
- name: Add MSVC++ Problem Matcher
if: runner.os == 'Windows'
run: |
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/msvc.json"
- name: Make needed directories, files and initializations
id: Init
run: |
mkdir -p ${{ env.builddir }}
mkdir -p ${{ env.logdir }}
mkdir -p ${{ env.reportdir }}
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- uses: prefix-dev/setup-pixi@v0.8.2
with:
pixi-version: v0.41.3
cache: false
- name: Restore Compiler Cache
uses: actions/cache/restore@v4
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
FC-${{ env.cacheKey }}-${{ github.ref }}-
FC-${{ env.cacheKey }}-
- name: Print CCache statistics before build, reset stats and print config
run: |
pixi run ccache -s
pixi run ccache -z
pixi run ccache -p
- name: CMake Configure
run: |
pixi run configure-release
- name: CMake Build
run: |
pixi run build
- name: Print ccache statistics after Build
run: |
pixi run ccache -s
- name: FreeCAD CLI tests on build dir
if: inputs.testOnBuildDir
timeout-minutes: 10
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on build dir"
testCommand: pixi run ${{ env.builddir }}/bin/FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD GUI tests on build dir
if: runner.os == 'Linux' && inputs.testOnBuildDir
timeout-minutes: 15
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "GUI tests on build dir"
testCommand: pixi run xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
logFile: ${{ env.logdir }}TestGUIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: C++ tests
timeout-minutes: 10
if: runner.os != 'Windows'
uses: ./.github/workflows/actions/runCPPTests/runAllTests
with:
reportdir: ${{ env.reportdir }}
builddir: ${{ env.builddir }}
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
- name: CMake Install
run: |
pixi run install
- name: FreeCAD CLI tests on install
if: runner.os != 'Windows'
timeout-minutes: 10
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on install"
testCommand: pixi run FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD GUI tests on install
# if: runner.os == 'Linux'
# currently broken on Qt6 builds
if: false
timeout-minutes: 15
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "GUI tests on install"
testCommand: pixi run xvfb-run FreeCAD -t 0
logFile: ${{ env.logdir }}TestGUIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Save Compiler Cache
if: always()
uses: actions/cache/save@v4
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifactBasename }}-${{ matrix.os }}-Logs
path: |
${{ env.logdir }}
/var/crash/*FreeCAD*
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ env.reportfilename }}
path: |
${{env.reportdir}}${{ env.reportfilename }}
-266
View File
@@ -1,266 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This is a build and test workflow for CI of FreeCAD.
# This workflow aims at building and testing FreeCAD on Ubuntu 20.04 using GCC.
name: Build Ubuntu 20.04
on:
workflow_call:
inputs:
artifactBasename:
type: string
required: true
testOnBuildDir:
default: false
type: boolean
required: false
allowedToFail:
default: false
type: boolean
required: false
outputs:
reportFile:
value: ${{ jobs.Build.outputs.reportFile }}
jobs:
Build:
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
continue-on-error: ${{ inputs.allowedToFail }}
env:
LC_ALL: en_US.utf8
DEBIAN_FRONTEND: noninteractive
# set in a step to workaround https://github.com/actions/runner/issues/2058
#CCACHE_DIR: ${{ github.workspace }}/ccache
#CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
CCACHE_MAXSIZE: 1G
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 1
CC: /usr/bin/gcc
CXX: /usr/bin/g++
#CC: /usr/bin/clang
#CXX: /usr/bin/clang++
# set in a step to workaround https://github.com/actions/runner/issues/2058
#builddir: ${{ github.workspace }}/build/release/
logdir: /tmp/logs/
reportdir: /tmp/report/
reportfilename: ${{ inputs.artifactBasename }}-report.md
defaults:
run:
shell: bash
outputs:
reportFile: ${{ steps.Init.outputs.reportFile }}
steps:
- name: Install basic packages
run: |
apt-get update -qq
apt-get install -y --no-install-recommends --reinstall language-pack-en sudo git ca-certificates build-essential cmake
- name: set env variables
run: |
echo "CCACHE_DIR=$GITHUB_WORKSPACE/ccache" >> "$GITHUB_ENV"
echo "CCACHE_CONFIGPATH=$GITHUB_WORKSPACE/ccache/config" >> "$GITHUB_ENV"
echo "builddir=$GITHUB_WORKSPACE/build/release/" >> "$GITHUB_ENV"
- name: Checking out source code
uses: actions/checkout@v4
with:
submodules: true
- name: Install FreeCAD dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
ccache \
doxygen \
graphviz \
imagemagick \
libboost-date-time-dev \
libboost-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-python-dev \
libboost-regex-dev \
libboost-serialization-dev \
libboost-thread-dev \
libcoin-dev \
libeigen3-dev \
libgts-bin \
libgts-dev \
libkdtree++-dev \
libmedc-dev \
libocct-data-exchange-dev \
libocct-ocaf-dev \
libocct-visualization-dev \
libopencv-dev \
libproj-dev \
libpyside2-dev \
libqt5opengl5-dev \
libqt5svg5-dev \
libqt5x11extras5-dev \
libshiboken2-dev \
libspnav-dev \
libvtk7-dev \
libx11-dev \
libxerces-c-dev \
libyaml-cpp-dev \
libzipios++-dev \
netgen \
netgen-headers \
ninja-build \
occt-draw \
pyqt5-dev-tools \
pyside2-tools \
python3-dev \
python3-git \
python3-markdown \
python3-matplotlib \
python3-packaging \
python3-pivy \
python3-ply \
python3-pyside2.qtcore \
python3-pyside2.qtgui \
python3-pyside2.qtnetwork \
python3-pyside2.qtsvg \
python3-pyside2.qtwidgets \
python3-yaml \
qtbase5-dev \
qttools5-dev \
shiboken2 \
swig \
xvfb
- name: Make needed directories, files and initializations
id: Init
run: |
mkdir -p ${{ env.CCACHE_DIR }}
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
mkdir -p ${{ env.builddir }}
mkdir -p ${{ env.logdir }}
mkdir -p ${{ env.reportdir }}
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- name: Generate cache key
id: genCacheKey
uses: ./.github/workflows/actions/linux/generateCacheKey
with:
compiler: ${{ env.CXX }}
qt_major_version: 5
- name: Restore Compiler Cache
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
- name: Print CCache statistics before build, reset stats and print config
run: |
ccache -s
ccache -z
ccache -p
- name: CMake Configure
uses: ./.github/workflows/actions/linux/configure
with:
extraParameters: -G Ninja -D CMAKE_BUILD_TYPE=Release
builddir: ${{ env.builddir }}
logFile: ${{ env.logdir }}Cmake.log
errorFile: ${{ env.logdir }}CmakeErrors.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: CMake Build
uses: ./.github/workflows/actions/linux/build
with:
builddir: ${{ env.builddir }}
logFile: ${{ env.logdir }}Build.log
errorFile: ${{ env.logdir }}BuildErrors.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Print ccache statistics after Build
run: |
ccache -s
- name: FreeCAD CLI tests on build dir
if: inputs.testOnBuildDir
timeout-minutes: 10
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on build dir"
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD GUI tests on build dir
if: inputs.testOnBuildDir
timeout-minutes: 15
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "GUI tests on build dir"
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
logFile: ${{ env.logdir }}TestGUIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: C++ tests
timeout-minutes: 1
uses: ./.github/workflows/actions/runCPPTests/runAllTests
with:
reportdir: ${{ env.reportdir }}
builddir: ${{ env.builddir }}
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
- name: CMake Install
uses: ./.github/workflows/actions/linux/install
with:
builddir: ${{ env.builddir }}
logFile: ${{ env.logdir }}Install.log
errorFile: ${{ env.logdir }}InstallErrors.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD CLI tests on install
timeout-minutes: 10
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on install"
testCommand: FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD GUI tests on install
timeout-minutes: 15
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "GUI tests on install"
testCommand: xvfb-run FreeCAD -t 0
logFile: ${{ env.logdir }}TestGUIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
/var/crash/*FreeCAD*
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ env.reportfilename }}
path: |
${{env.reportdir}}${{ env.reportfilename }}
@@ -1,201 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This is a build and test workflow for CI of FreeCAD.
# This workflow aims at building and testing FreeCAD on a Conda environment on Linux.
name: Build Ubuntu 24.04 (Conda)
on:
workflow_call:
inputs:
artifactBasename:
type: string
required: true
testOnBuildDir:
default: false
type: boolean
required: false
allowedToFail:
default: false
type: boolean
required: false
outputs:
reportFile:
value: ${{ jobs.Build.outputs.reportFile }}
jobs:
Build:
runs-on: ubuntu-24.04
continue-on-error: ${{ inputs.allowedToFail }}
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
CCACHE_MAXSIZE: 1G
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 1
builddir: ${{ github.workspace }}/build/release/
logdir: /tmp/logs/
reportdir: /tmp/report/
reportfilename: ${{ inputs.artifactBasename }}-report.md
defaults:
run:
shell: bash -l {0}
outputs:
reportFile: ${{ steps.Init.outputs.reportFile }}
steps:
- name: Checking out source code
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Miniconda
env:
CONDA_VERBOSITY: 2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: .conda/freecad
environment-file: conda/conda-env.yaml
channels: conda-forge
channel-priority: true
miniforge-version: latest
conda-remove-defaults: "true"
- name: Install FreeCAD dependencies
env:
CONDA_VERBOSITY: 2
run: |
./conda/setup-environment.sh
- name: Set Environment Variables
run: |
echo "CC=$CC" >> "$GITHUB_ENV"
echo "CXX=$CXX" >> "$GITHUB_ENV"
- name: Make needed directories, files and initializations
id: Init
run: |
mkdir -p ${{ env.CCACHE_DIR }}
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
mkdir -p ${{ env.builddir }}
mkdir -p ${{ env.logdir }}
mkdir -p ${{ env.reportdir }}
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- name: Generate cache key
id: genCacheKey
uses: ./.github/workflows/actions/linux/generateCacheKey
with:
compiler: ${{ env.CXX }}
qt_major_version: 5
- name: Restore Compiler Cache
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
- name: Print CCache statistics before build, reset stats and print config
run: |
ccache -s
ccache -z
ccache -p
- name: CMake Configure
uses: ./.github/workflows/actions/linux/configure
with:
extraParameters: --preset conda-linux-release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
builddir: ${{ env.builddir }}
logFile: ${{ env.logdir }}Cmake.log
errorFile: ${{ env.logdir }}CmakeErrors.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: CMake Build
uses: ./.github/workflows/actions/linux/build
with:
builddir: ${{ env.builddir }}
logFile: ${{ env.logdir }}Build.log
errorFile: ${{ env.logdir }}BuildErrors.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Print ccache statistics after Build
run: |
ccache -s
- name: FreeCAD CLI tests on build dir
if: inputs.testOnBuildDir
timeout-minutes: 10
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on build dir"
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD GUI tests on build dir
if: inputs.testOnBuildDir
timeout-minutes: 15
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "GUI tests on build dir"
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
logFile: ${{ env.logdir }}TestGUIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: C++ tests
timeout-minutes: 1
uses: ./.github/workflows/actions/runCPPTests/runAllTests
with:
reportdir: ${{ env.reportdir }}
builddir: ${{ env.builddir }}
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
- name: CMake Install
uses: ./.github/workflows/actions/linux/install
with:
builddir: ${{ env.builddir }}
logFile: ${{ env.logdir }}Install.log
errorFile: ${{ env.logdir }}InstallErrors.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD CLI tests on install
timeout-minutes: 10
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on install"
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD GUI tests on install
timeout-minutes: 15
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "GUI tests on install"
testCommand: xvfb-run ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCAD -t 0
logFile: ${{ env.logdir }}TestGUIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
/var/crash/*FreeCAD*
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ env.reportfilename }}
path: |
${{env.reportdir}}${{ env.reportfilename }}
-136
View File
@@ -1,136 +0,0 @@
# ***************************************************************************
# * Copyright (c) 2023 0penBrain *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU Lesser General Public License (LGPL) *
# * as published by the Free Software Foundation; either version 2 of *
# * the License, or (at your option) any later version. *
# * for detail see the LICENCE text file. *
# * *
# * This program is distributed in the hope that it will be useful, *
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
# * GNU Library General Public License for more details. *
# * *
# * You should have received a copy of the GNU Library General Public *
# * License along with this program; if not, write to the Free Software *
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
# * USA *
# * *
# ***************************************************************************
# This is a build and test workflow for CI of FreeCAD.
# This workflow aims at building and testing FreeCAD on Windows using MSVC.
name: Build Windows
on:
workflow_call:
inputs:
artifactBasename:
type: string
required: true
allowedToFail:
default: false
type: boolean
required: false
outputs:
reportFile:
value: ${{ jobs.Build.outputs.reportFile }}
jobs:
Build:
runs-on: windows-latest
continue-on-error: ${{ inputs.allowedToFail }}
env:
CCACHE_DIR: C:/FC/cache/
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
CCACHE_MAXSIZE: 1G
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 1
CCACHE_NOHASHDIR: true
CCACHE_DIRECT: true
#CCACHE_SLOPPINESS: "pch_defines,time_macros" # Can't get PCH to work on Windows
CCACHE_LOGFILE: C:/logs/ccache.log
## Have to use C:\ because not enough space on workspace drive
builddir: C:/FC/build/release/
libpackdir: C:/FC/libpack/
ccachebindir: C:/FC/ccache/
logdir: C:/logs/
reportdir: C:/report/
reportfilename: ${{ inputs.artifactBasename }}-report.md
outputs:
reportFile: ${{ steps.Init.outputs.reportFile }}
steps:
- name: Checking out source code
uses: actions/checkout@v4
with:
submodules: true
- name: Make needed directories, files and initializations
id: Init
run: |
mkdir ${{ env.CCACHE_DIR }}
mkdir ${{ env.ccachebindir }}
mkdir ${{ env.libpackdir }}
mkdir ${{ env.builddir }}
mkdir ${{ env.logdir }}
mkdir ${{ env.reportdir }}
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- name: Get Ccache
uses: ./.github/workflows/actions/windows/getCcache
with:
ccachebindir: ${{ env.ccachebindir }}
- name: Get Libpack
uses: ./.github/workflows/actions/windows/getLibpack
with:
libpackdir: ${{ env.libpackdir }}
- name: Restore compiler cache
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-Windows-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
FC-Windows-${{ github.ref }}-
FC-Windows-
- name: Print Ccache statistics before build, reset stats and print config
run: |
. $env:ccachebindir\ccache -s
. $env:ccachebindir\ccache -z
. $env:ccachebindir\ccache -p
- name: Configuring CMake
run: >
cmake -B"${{ env.builddir }}" .
--preset release
-DCMAKE_VS_NO_COMPILE_BATCHING=ON
-DCMAKE_BUILD_TYPE=Release
-DFREECAD_USE_PCH=OFF
-DFREECAD_RELEASE_PDB=OFF
-DFREECAD_LIBPACK_DIR="${{ env.libpackdir }}"
-DFREECAD_COPY_DEPEND_DIRS_TO_BUILD=ON
-DFREECAD_COPY_LIBPACK_BIN_TO_BUILD=ON
-DFREECAD_COPY_PLUGINS_BIN_TO_BUILD=ON
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Compiling sources
run: |
cd $env:builddir
msbuild ALL_BUILD.vcxproj /m /p:Configuration=Release /p:TrackFileAccess=false /p:CLToolPath=${{ env.ccachebindir }}
- name: Print Ccache statistics after build
run: |
. $env:ccachebindir\ccache -s
- name: C++ unit tests
if: false # Disabled because seems to not function on Windows build
timeout-minutes: 1
run: |
. ${{ env.builddir }}\tests\Release\Tests_run --gtest_output=json:${{ env.reportdir }}gtest_results.json # 2>&1 | tee -filepath ${{ env.logdir }}\unitTests.log
- name: FreeCAD CLI tests
run: |
. ${{ env.builddir }}\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}\integrationTests.log
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
-769
View File
@@ -1,769 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This is the lint workflow for CI of FreeCAD
name: Lint
on:
workflow_call:
inputs:
artifactBasename:
type: string
required: true
changedFiles:
type: string
required: true
changedCppFiles:
type: string
required: true
changedPythonFiles:
type: string
required: true
checkLineendings:
default: false
type: boolean
required: false
lineendingsFailSilent:
default: true
type: boolean
required: false
checkWhitespace:
default: true
type: boolean
required: false
whitespaceFailSilent:
default: true
type: boolean
required: false
checkTabs:
default: true
type: boolean
required: false
tabsFailSilent:
default: true
type: boolean
required: false
checkQtConnections:
default: true
type: boolean
required: false
qtConnectionsFailSilent:
default: true
type: boolean
required: false
checkCpplint:
default: true
type: boolean
required: false
cpplintFilters:
default: -whitespace-*
type: string
required: false
cpplintLineLength:
default: 120
type: string
required: false
cpplintFailSilent:
default: true
type: boolean
required: false
checkPylint:
default: true
type: boolean
required: false
pylintDisable:
default: C0302,C0303 # Trailing whitespaces (C0303) are already checked
type: string
required: false
pylintFailSilent:
default: true
type: boolean
required: false
checkBlack:
default: true
type: boolean
required: false
blackFailSilent:
default: true
type: boolean
required: false
checkClangFormat:
default: false
type: boolean
required: false
clangStyle:
default: file # for .clang-format file
type: string
required: false
clangFormatFailSilent:
default: true
type: boolean
required: false
checkSpelling:
default: true
type: boolean
required: false
listIgnoredMisspelling:
default: .github/codespellignore
type: string
required: false
spellingIgnore:
default: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL*,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/
type: string
required: false
codespellFailSilent:
default: true
type: boolean
required: false
checkClangTidy:
default: true
type: boolean
required: false
clangTidyChecks:
default: # empty to use the .clang-tidy file
type: string
required: false
clangTidyFailSilent:
default: true # warnings or notes will never fail the CI, only errors
type: boolean
required: false
checkClazy: # for the Message codes see: https://invent.kde.org/sdk/clazy#list-of-checks
default: true
type: boolean
required: false
clazyChecks:
default: level2,no-non-pod-global-static,no-copyable-polymorphic
type: string
required: false
clazyFailSilent:
default: true # warnings or notes will never fail the CI, only errors
type: boolean
required: false
checkClazyQT6:
default: true
type: boolean
required: false
clazyQT6Checks:
default: qt6-deprecated-api-fixes,qt6-header-fixes,qt6-qhash-signature,qt6-fwd-fixes,missing-qobject-macro # for QT6 Porting https://invent.kde.org/sdk/clazy#list-of-checks
type: string
required: false
QT6Branch: # branch to check for QT6 Porting
default: main
type: string
required: false
clazyQT6FailSilent:
default: true # warnings or notes will never fail the CI, only errors
type: boolean
required: false
outputs:
reportFile:
value: ${{ jobs.Lint.outputs.reportFile }}
jobs:
Lint:
if: inputs.changedFiles != ''
runs-on: ubuntu-latest
env:
logdir: /tmp/logs/
fixesdir: /tmp/fixes/
reportdir: /tmp/report/
reportfilename: ${{ inputs.artifactBasename }}-report.md
defaults:
run:
shell: bash
outputs:
reportFile: ${{ steps.Init.outputs.reportFile }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
- name: Make needed directories, files and initializations
id: Init
run: |
mkdir -p ${{ env.logdir }}
mkdir -p ${{ env.fixesdir }}
mkdir -p ${{ env.reportdir }}
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
# Run generic lints
- name: Check for non Unix line ending
if: inputs.checkLineendings && always()
continue-on-error: ${{ inputs.lineendingsFailSilent }}
run: |
lineendings=0
for file in ${{ inputs.changedFiles }}
do
# Check for DOS or MAC line endings
if [[ $(file -b $file) =~ "with CR" ]]
then
echo "::warning file=$file,title=$file::File has non Unix line endings"
echo "$file has non Unix line endings" >> ${{ env.logdir }}lineendings.log
((lineendings=lineendings+1))
fi
done
echo "Found $lineendings line ending errors"
# Write the report
if [ $lineendings -gt 0 ]
then
echo "<details><summary>:information_source: Found $lineendings problems with line endings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}lineendings.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo ":heavy_check_mark: No line ending problem found " >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $lineendings -eq 0 ]
- name: Check for trailing whitespaces
if: inputs.checkWhitespace && always()
continue-on-error: ${{ inputs.whitespaceFailSilent }}
run: |
whitespaceErrors=0
exclude="*[.md]"
for file in ${{ inputs.changedFiles }}
do
# Check for trailing whitespaces
grep -nIHE --exclude="$exclude" " $" $file | sed -e "s/$/<-- trailing whitespace/" >> ${{ env.logdir }}whitespace.log || true
done
# Write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}whitespace.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
cat ${{ env.logdir }}whitespace.log
echo "::remove-matcher owner=grepMatcher-warning::"
whitespaceErrors=$(wc -l < ${{ env.logdir }}whitespace.log)
fi
echo "Found $whitespaceErrors whitespace errors"
# Write the report
if [ $whitespaceErrors -gt 0 ]
then
echo "<details><summary>:information_source: Found $whitespaceErrors trailing whitespace</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}whitespace.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo ":heavy_check_mark: No trailing whitespace found " >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $whitespaceErrors -eq 0 ]
- name: Check for Tab usage
if: inputs.checkTabs && always()
continue-on-error: ${{ inputs.tabsFailSilent }}
run: |
tabErrors=0
exclude="*[.md]"
# Check for Tab usage
for file in ${{ steps.changed-files.outputs.all_changed_files }}
do
grep -nIHE --exclude="$exclude" $'\t' $file | sed -e "s/$/ <-- contains tab/" >> ${{ env.logdir }}tab.log || true
done
# Write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}tab.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
cat ${{ env.logdir }}tab.log
echo "::remove-matcher owner=grepMatcher-warning::"
tabErrors=$(wc -l < ${{ env.logdir }}tab.log)
fi
echo "Found $tabErrors tab errors"
# Write the report
if [ $tabErrors -gt 0 ]; then
echo "<details><summary>:information_source: Found $tabErrors tabs, better to use spaces</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}tab.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo ":heavy_check_mark: No tabs found" >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $tabErrors -eq 0 ]
# Run Python lints
- name: Pylint
if: inputs.checkPylint && inputs.changedPythonFiles != '' && always()
continue-on-error: ${{ inputs.pylintFailSilent }}
run: |
pylintErrors=0
pylintWarnings=0
pylintRefactorings=0
pylintConventions=0
pip install --break-system-packages pylint
# List enabled pylint checks
pylint --list-msgs-enabled > ${{ env.logdir }}pylint-enabled-checks.log
# Run pylint on all python files
set +e
pylint --disable=${{ inputs.pylintDisable }} ${{ inputs.changedPythonFiles }} > ${{ env.logdir }}pylint.log
exitCode=$?
set -e
# If pylint has run successfully, write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}pylint.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintError.json"
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintWarning.json"
cat ${{ env.logdir }}pylint.log
echo "::remove-matcher owner=pylint-error::"
echo "::remove-matcher owner=pylint-warning::"
pylintErrors=$( grep -oP '(?<=error \|)\d+' ${{ env.logdir }}pylint.log) || true # grep returns 0 if no match is found
pylintWarnings=$( grep -oP '(?<=warning \|)\d+' ${{ env.logdir }}pylint.log) || true
pylintRefactorings=$( grep -oP '(?<=refactor \|)\d+' ${{ env.logdir }}pylint.log) || true
pylintConventions=$( grep -oP '(?<=convention \|)\d+' ${{ env.logdir }}pylint.log) || true
fi
echo "Found $pylintErrors errors, $pylintWarnings warnings, $pylintRefactorings refactorings, $pylintConventions conventions"
# Write the report
if [ $pylintErrors -gt 0 ]
then
echo "<details><summary>:fire: Pylint found :fire: $pylintErrors errors, :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ $pylintWarnings -gt 0 ]
then
echo "<details><summary>:warning: Pylint found :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ $pylintRefactorings -gt 0 ]
then
echo "<details><summary>:construction: Pylint found :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ $pylintConventions -gt 0 ]
then
echo "<details><summary>:pencil2: Pylint found :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo "<details><summary>:heavy_check_mark: No pylint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# List enabled checks in the report
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}pylint-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}pylint.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $pylintErrors -eq 0 ]
- name: Black (Python)
if: inputs.checkBlack && inputs.changedPythonFiles != '' && always()
continue-on-error: ${{ inputs.blackFailSilent }}
run: |
blackReformats=0
blackFails=0
pip install --break-system-packages black
set +e
black --line-length 100 --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
exitCode=$?
set -e
# If black has run successfully, write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}black.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/blackWarning.json"
cat ${{ env.logdir }}black.log
echo "::remove-matcher owner=black-warning::"
blackReformats=$( grep -oP '\d+(?= fil.+ would be reformatted)' ${{ env.logdir }}black.log) || true # grep returns 0 if no match is found
blackFails=$( grep -oP '\d+(?= fil.+ would fail to reformat)' ${{ env.logdir }}black.log) || true
fi
echo "Found $blackReformats files would be reformatted and $blackFails files would fail to reformat"
# Write the report
if [ $blackReformats -gt 0 ] || [ $blackFails -gt 0 ] #FIXME purpose of testing $blackFails as we don't use it then
then
echo "<details><summary>:pencil2: Black would reformat $blackReformats files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo "<details><summary>:heavy_check_mark: Black would reformat no file</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}black.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $exitCode -eq 0 ]
# Run C++ lints
- name: Install FreeCAD dependencies
if: inputs.changedCppFiles != '' && always()
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
doxygen \
graphviz \
imagemagick \
libboost-date-time-dev \
libboost-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-python-dev \
libboost-regex-dev \
libboost-serialization-dev \
libboost-thread-dev \
libcoin-dev \
libeigen3-dev \
libgts-bin \
libgts-dev \
libkdtree++-dev \
libmedc-dev \
libocct-data-exchange-dev \
libocct-ocaf-dev \
libocct-visualization-dev \
libopencv-dev \
libproj-dev \
libpyside2-dev \
libqt5opengl5-dev \
libqt5svg5-dev \
libqt5x11extras5-dev \
libshiboken2-dev \
libspnav-dev \
libvtk9-dev \
libx11-dev \
libxerces-c-dev \
libyaml-cpp-dev \
libzipios++-dev \
netgen \
netgen-headers \
occt-draw \
pyside2-tools \
python3-dev \
python3-git \
python3-markdown \
python3-matplotlib \
python3-packaging \
python3-pivy \
python3-ply \
python3-pyside2.qtcore \
python3-pyside2.qtgui \
python3-pyside2.qtnetwork \
python3-pyside2.qtsvg \
python3-pyside2.qtwidgets \
qtbase5-dev \
qttools5-dev \
shiboken2 \
swig \
ccache \
xvfb
- name: Run CMake # This is needed for Clang tools to work correctly
if: inputs.changedCppFiles != '' && always()
run: |
mkdir build && cmake -S ./ -B ./build/ -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
- name: Check old Qt string-based connections (https://wiki.qt.io/New_Signal_Slot_Syntax)
if: inputs.checkQtConnections && inputs.changedCppFiles != '' && always()
continue-on-error: ${{ inputs.qtConnectionsFailSilent }}
run: |
qtconnectionSyntax=0
exclude="*[.md,.log,.ts,.git]"
# Check all files for QT string-based connections
for file in ${{ inputs.changedFiles }} #TODO does this makes sense in Python files ?
do
grep -nIHE --exclude="$exclude" $' SIGNAL| SLOT' $file | sed -e "s/$/ <--Consider using Functor-Based Connections/" >> ${{ env.logdir }}qtConnections.log || true #TODO seems to trigger false positives
done
# Write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}qtConnections.log ]; then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
cat ${{ env.logdir }}qtConnections.log
echo "::remove-matcher owner=grepMatcher-warning::"
qtconnectionSyntax=$(wc -l < ${{ env.logdir }}qtConnections.log)
fi
echo "Found $qtconnectionSyntax QT string-based connections"
# Write the report
if [ $qtconnectionSyntax -gt 0 ]; then
echo "<details><summary>:information_source: Found $qtconnectionSyntax QT string-based connections :arrow_right: consider using QT functor-Based Connections</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# documentation link
echo "For more information see: https://wiki.qt.io/New_Signal_Slot_Syntax or https://github.com/FreeCAD/FreeCAD/issues/6166" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}qtConnections.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo ":heavy_check_mark: No string-based connections found " >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $qtconnectionSyntax -eq 0 ]
- name: Cpplint
if: inputs.checkCpplint && inputs.changedCppFiles != '' && always()
continue-on-error: ${{ inputs.cpplintFailSilent }}
run: |
cpplintErrors=0
pip install --break-system-packages cpplint
# Run cpplint
for file in ${{ inputs.changedCppFiles }}
do
cpplint --filter=${{ inputs.cpplintFilters }} --linelength=${{ inputs.cpplintLineLength }} $file &>> ${{ env.logdir }}cpplint.log || true
done
# If cpplint has run successfully, write the Log to the console with the Problem Matchers
if [ ${{ env.logdir }}cpplint.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/cpplint.json"
cat ${{ env.logdir }}cpplint.log
echo "::remove-matcher owner=cpplint::"
cpplintErrors=$(grep -nIHE "\[[0-9]\]$" ${{ env.logdir }}cpplint.log | wc -l ) || true
fi
echo "Found $cpplintErrors cpplint errors"
# Write the report
if [ $cpplintErrors -gt 0 ]
then
echo "<details><summary>:warning: CppLint found $cpplintErrors errors / warnings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo "<details><summary>:heavy_check_mark: No cpplint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}cpplint.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $cpplintErrors -eq 0 ]
- name: Clang-format
if: inputs.checkClangFormat && inputs.changedCppFiles != '' && always()
continue-on-error: ${{ inputs.clangFormatFailSilent }}
run: |
clangFormatErrors=0
# Run clang-format on all cpp files
clang-format --dry-run --ferror-limit=1 --verbose --style=${{ inputs.clangStyle }} ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-format.log || true
# If clang-format has run successfully, write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}clang-format.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
cat ${{ env.logdir }}clang-format.log
echo "::remove-matcher owner=clang::"
clangFormatErrors=$(grep -nIHE "\[-Wclang-format-violations]$" ${{ env.logdir }}clang-format.log | wc -l ) || true
fi
echo "Found $clangFormatErrors clang-format errors"
# Write the report
if [ $clangFormatErrors -gt 0 ]
then
echo "<details><summary>:pencil2: Clang-format would reformat $clangFormatErrors files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo "<details><summary>:heavy_check_mark: Clang-format would reformat no file</summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}clang-format.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $clangFormatErrors -eq 0 ]
- name: Codespell
if: inputs.checkSpelling && always()
continue-on-error: ${{ inputs.codespellFailSilent }}
run: |
pip install --break-system-packages codespell
wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
#wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary_rare.txt
set +e
misspellings=$( { codespell --quiet-level 3 --summary --count --ignore-words ${{ inputs.listIgnoredMisspelling }} --skip ${{ inputs.spellingIgnore }} -D dictionary.txt ${{ inputs.changedFiles }} > ${{ env.logdir }}codespell.log ; } 2>&1 )
set -e
# If codespell has run successfully, write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}codespell.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/codespell.json"
cat ${{ env.logdir }}codespell.log
echo "::remove-matcher owner=codespell::"
fi
echo "Found $misspellings misspellings"
# Write the report
if [ $misspellings -gt 0 ]
then
echo "<details><summary>:pencil2: Codespell found $misspellings misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo "<details><summary>:heavy_check_mark: Codespell found no misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "To ignore false positives, append the word to the [.github/codespellignore](https://github.com/FreeCAD/FreeCAD/blob/master/.github/codespellignore) file (lowercase)" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}codespell.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $misspellings -eq 0 ]
- name: Clang-tidy
if: inputs.checkClangTidy && inputs.changedCppFiles != '' && always()
continue-on-error: ${{ inputs.clangTidyFailSilent }}
run: |
clangTidyErrors=0
clangTidyWarnings=0
clangTidyNotes=0
sudo apt-get install -y --no-install-recommends clang-tidy
#TODO: check where this "clang-tidy.yaml" goes ; shall this be put in the fixes ?
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ --explain-config &>> ${{ env.logdir }}clang-tidy-enabled-checks.log
# Run clang-tidy on all cpp files
set +e
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-tidy.log
exitCode=$?
set -e
# If clang-tidy has run successfully, write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}clang-tidy.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
cat ${{ env.logdir }}clang-tidy.log
echo "::remove-matcher owner=clang::"
clangTidyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
clangTidyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
clangTidyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
fi
echo "Found $clangTidyErrors errors, $clangTidyWarnings warnings, $clangTidyNotes notes"
# Write the report
if [ $clangTidyErrors -gt 0 ]
then
echo "<details><summary>:fire: Clang-Tidy found :fire: $clangTidyErrors errors, :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ $clangTidyWarnings -gt 0 ]
then
echo "<details><summary>:warning: Clang-Tidy found :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ $clangTidyNotes -gt 0 ]
then
echo "<details><summary>:pencil2: Clang-Tidy found :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo "<details><summary>:heavy_check_mark: Clang-Tidy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# List enabled checks in the report
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}clang-tidy-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}clang-tidy.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $clangTidyErrors -eq 0 ]
- name: Clazy
if: inputs.checkClazy && inputs.changedCppFiles != '' && always()
continue-on-error: ${{ inputs.clazyFailSilent }}
run: |
clazyErrors=0
clazyWarnings=0
clazyNotes=0
sudo apt-get install -y --no-install-recommends clazy
#TODO: check where this "clazy.yaml" goes ; shall this be put in the fixes ?
# Run clazy on all cpp files
clazy-standalone --export-fixes=clazy.yaml -checks=${{ inputs.clazyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazy.log || true
# If clazy has run successfully, write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}clazy.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
cat ${{ env.logdir }}clazy.log
echo "::remove-matcher owner=clang::"
clazyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
clazyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
clazyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
fi
echo "Found $clazyErrors errors, $clazyWarnings warnings, $clazyNotes notes"
# Write the report
if [ "$clazyErrors" -gt 0 ]
then
echo "<details><summary>:fire: Clazy found :fire: $clazyErrors errors, :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ "$clazyWarnings" -gt 0 ]
then
echo "<details><summary>:warning: Clazy found :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ "$clazyNotes" -gt 0 ]
then
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "[List of checks](https://github.com/KDE/clazy#list-of-checks), [This explains some of the clazy warnings](https://www.kdab.com/uncovering-32-qt-best-practices-compile-time-clazy/) " >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}clazy.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $clazyErrors -eq 0 ]
- name: Clazy-QT6
if: inputs.checkClazyQT6 && inputs.changedCppFiles != '' && github.ref == inputs.QT6Branch && always()
continue-on-error: ${{ inputs.clazyQT6FailSilent }}
run: |
clazyQT6Errors=0
clazyQT6Warnings=0
clazyQT6Notes=0
sudo apt-get install -y --no-install-recommends clazy
#TODO: check where this "clazyQT6.yaml" goes ; shall this be put in the fixes ?
# Run clazy checks for Qt6 on all cpp files
clazy-standalone --export-fixes=clazyQT6.yaml -checks=${{ inputs.clazyQT6Checks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazyQT6.log || true
# If clazy has run successfully, write the Log to the console with the Problem Matchers
if [ -f ${{ env.logdir }}clazyQT6.log ]
then
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
cat ${{ env.logdir }}clazyQT6.log
echo "::remove-matcher owner=clang::"
clazyQT6Errors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
clazyQT6Warnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
clazyQT6Notes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
fi
echo "Found $clazyQT6Errors errors, $clazyQT6Warnings warnings, $clazyQT6Notes notes"
# Write the report
if [ "$clazyQT6Errors" -gt 0 ]
then
echo "<details><summary>:fire: Clazy found :fire: $clazyQT6Errors errors, :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ "$clazyQT6Warnings" -gt 0 ]
then
echo "<details><summary>:warning: Clazy found :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
elif [ "$clazyNotes" -gt 0 ]
then
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
else
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
fi
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}clazyQT6.log >> ${{env.reportdir}}${{ env.reportfilename }}
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
[ $clazyQT6Errors -eq 0 ]
- name: Upload logs and fixes
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
${{ env.fixesdir }}
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ env.reportfilename }}
path: |
${{env.reportdir}}${{ env.reportfilename }}
-162
View File
@@ -1,162 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This is the pre-check workflow for CI of FreeCAD.
# It aims at running some basic checks about the workflow run ...
# ... and gathering some data needed for the next steps.
name: Prepare
on:
workflow_call:
inputs:
artifactBasename:
type: string
required: true
dontFailOnOldRebase:
default: true
type: boolean
required: false
maxRebaseHours:
default: "48"
type: string
required: false
outputs:
reportFile:
value: ${{ jobs.Prepare.outputs.reportFile }}
changedFiles:
value: ${{ jobs.Prepare.outputs.changedFiles }}
changedPythonFiles:
value: ${{ jobs.Prepare.outputs.changedPythonFiles }}
changedCppFiles:
value: ${{ jobs.Prepare.outputs.changedCppFiles }}
jobs:
Prepare:
env:
isPR: ${{ github.event_name == 'pull_request' }}
isPush: ${{ github.event_name == 'push' }}
logdir: /tmp/logs/
reportdir: /tmp/report/
reportfilename: ${{ inputs.artifactBasename }}-report.md
runs-on: ubuntu-latest
defaults:
run:
shell: bash
outputs:
reportFile: ${{ steps.Init.outputs.reportFile }}
changedFiles: ${{ steps.Output.outputs.changedFiles }}
changedPythonFiles: ${{ steps.Output.outputs.changedPythonFiles }}
changedCppFiles: ${{ steps.Output.outputs.changedCppFiles }}
steps:
- name: Make needed directories, files and initializations
id: Init
run: |
mkdir -p ${{ env.logdir }}
mkdir -p ${{ env.reportdir }}
commitCnt=0
touch ${{ env.logdir }}changedFiles.lst ${{ env.logdir }}changedCppFiles.lst ${{ env.logdir }}changedPythonFiles.lst
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- name: Determine base and head SHA in case of PR
if: env.isPR == 'true'
run: |
baseSha=${{ github.event.pull_request.base.sha }}
headSha=${{ github.event.pull_request.head.sha }}
echo "baseSha=$baseSha" >> $GITHUB_ENV
echo "headSha=$headSha" >> $GITHUB_ENV
echo "This CI run is performed on a Pull Request" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
echo "Base SHA is $baseSha, Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
- name: Check if PR has been recently rebased
if: env.isPR == 'true'
continue-on-error: ${{ inputs.dontFailOnOldRebase }}
run: |
baseDate=$(curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/commits/$baseSha | jq -r '.commit.committer.date')
dateDiff=$(( ( $(date +%s) - $(date -d $baseDate +%s) ) / 3600 ))
echo "Pull request is based on a $dateDiff hour-old commit" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
# Exit the step with appropriate code
if [ $dateDiff -gt ${{ inputs.maxRebaseHours }} ]
then
echo -n ":warning: Pull request should be rebased" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
exit 1
fi
- name: Determine base and head SHA in case of push
if: env.isPush == 'true'
run: |
baseSha=${{ github.event.before }}
headSha=${{ github.event.after }}
echo "headSha=$headSha" >> $GITHUB_ENV
if [ $baseSha -eq 0 ]
then
echo "This CI run is performed on a Push that created a new branch : files changed will be ignored" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
echo "Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
echo "isPush='false'" >> $GITHUB_ENV
else
echo "This CI run is performed on a Push" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
echo "Base SHA is $baseSha, Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
echo "baseSha=$baseSha" >> $GITHUB_ENV
fi
- name: Get compare between head and base
if: env.isPR == 'true' || env.isPush == 'true'
run: |
echo "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/compare/$baseSha...$headSha"
curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/compare/$baseSha...$headSha > ${{ env.logdir }}compare.json
- name: Get number of commits in the changeset
if: env.isPR == 'true' || env.isPush == 'true'
run: |
commitCnt=$(jq -re '.ahead_by' ${{ env.logdir }}compare.json)
echo "Changeset is composed of $commitCnt commit(s)" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
- name: Get files modified in changeset #TODO check what happens with deleted file in the subsequent process
if: env.isPR == 'true' || env.isPush == 'true'
run: |
jq '.files[] | if .status != "removed" then .filename else empty end' ${{ env.logdir }}compare.json > ${{ env.logdir }}changedFiles.lst
grep -E '\.(py|py3)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedPythonFiles.lst || true
grep -E '\.(c|c\+\+|cc|cpp|cu|cuh|cxx|h|h\+\+|hh|hpp|hxx)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedCppFiles.lst || true
# Write the report
echo "::group::Modified files in changeset (removed files are ignored) :" ; cat ${{ env.logdir }}changedFiles.lst ; echo "::endgroup::"
echo "<details><summary>Modified files (removed files are ignored):</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
cat ${{ env.logdir }}changedFiles.lst >> ${{env.reportdir}}${{ env.reportfilename }}
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
- name: Transmitting outputs
id: Output
run: |
echo "changedFiles=$(cat ${{ env.logdir }}changedFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
echo "changedPythonFiles=$(cat ${{ env.logdir }}changedPythonFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
echo "changedCppFiles=$(cat ${{ env.logdir }}changedCppFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ env.reportfilename }}
path: |
${{env.reportdir}}${{ env.reportfilename }}
-117
View File
@@ -1,117 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
# This is a generic wrapup workflow that only aims at gathering reports and ...
# ... presenting them as a unified summary
#
# It expects steps to be summarized to be presented a JSON input formatted ...
# ... as the "needs" context of Github :
# https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
# In addition to standard "result", each step shall have a string entry in "outputs" ...
# ... named "reportFile" containing the name of the corresponding report. The ...
# ... report file shall be available in an artifact with the same name.
name: WrapUp
on:
workflow_call:
inputs:
previousSteps:
type: string
required: true
jobs:
WrapUp:
runs-on: ubuntu-latest
env:
artifactsDownloadDir: /tmp/artifacts/
defaults:
run:
shell: bash
steps:
- name: Make needed directories, files and initializations
run: |
mkdir -p ${{ env.artifactsDownloadDir }}
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ${{ env.artifactsDownloadDir }}
- name: Save input data to file
run: |
cat > data << "EOD"
${{ inputs.previousSteps }}
EOD
- name: Compute the report
run: |
echo "usedArtifacts<<EOD" >> $GITHUB_ENV
for step in $(jq -r "keys_unsorted | .[]" data)
do
echo "Processing step $step"
result=$(jq -r ".\"$step\".result" data)
icon=":heavy_check_mark:"
if [ $result == 'failure' ]
then
icon=":x:"
elif [ $result == 'cancelled' ]
then
icon=":no_entry_sign:"
elif [ $result == 'skipped' ]
then
icon=":white_check_mark:"
fi
echo "### $icon $step step" >> report.md
if [ $result == 'skipped' ]
then
echo "Step was skipped, no report was generated" | tee -a report.md
continue
elif [ $result == 'cancelled' ]
then
echo "Step was cancelled when executing, report may be incomplete" | tee -a report.md
fi
report=$(jq -r ".\"$step\".outputs.reportFile" data)
if [ $report ]
then
echo "Report for step $step is $report"
echo "$report" >> $GITHUB_ENV
if [ $(find ${{ env.artifactsDownloadDir }} -type f -name $report | wc -l) -eq 1 ]
then
find ${{ env.artifactsDownloadDir }} -type f -name $report -exec cat {} \; >> report.md
else
echo "No or several files found for report $report, not printing" | tee -a report.md
echo "Below files found :"
find ${{ env.artifactsDownloadDir }} -type f -name $report
fi
else
echo "Report file was not set by step $step" | tee -a report.md
fi
echo "" >> report.md
done
echo "EOD" >> $GITHUB_ENV
cat report.md >> $GITHUB_STEP_SUMMARY
- name: Delete used artifacts
continue-on-error: true
uses: geekyeggo/delete-artifact@v5
with:
name: |
${{ env.usedArtifacts }}
+3 -20
View File
@@ -1,30 +1,22 @@
# file types to ignore
.*
!/.gitignore
!/.travis/
!/.travis.yml
!/.clang-format
!/.clang-tidy
!/.git-blame-ignore-revs
!/.gitattributes
!/.gitignore
!/.gitmodules
!/.pre-commit-config.yaml
!/.pylintrc
!/.github/
!/contrib/.vscode/
!*.gitattributes
!*.gitignore
*.DS_Store
*.pyc
*.obj
*.lib
*.pch
*.vcproj
*.kdev4
*.exp
*.dep
*.manifest
*.o
*.orig
*.output
qrc_*.cpp
BuildLog.htm
cmake_install.cmake
@@ -45,22 +37,13 @@ install_manifest.txt
/Mod/
/ZERO_CHECK.dir/
/build/
/cmake-build*/
/src/Tools/offlinedoc/localwiki/
/src/Tools/offlinedoc/*.txt
/conda/environment.yml
/.vscode/
OpenSCAD_rc.py
tags
/CMakeUserPresets.json
Testing
compile_commands.json
# crowdin file
src/Tools/freecad.zip
tsupdate_stderr.log
tsupdate_stdout.log
files_to_translate.txt
# pixi environments
.pixi
*.egg-info
-9
View File
@@ -1,9 +0,0 @@
[submodule "src/3rdParty/OndselSolver"]
path = src/3rdParty/OndselSolver
url = https://github.com/Ondsel-Development/OndselSolver.git
[submodule "tests/lib"]
path = tests/lib
url = https://github.com/google/googletest
[submodule "src/3rdParty/GSL"]
path = src/3rdParty/GSL
url = https://github.com/microsoft/GSL
+3
View File
@@ -0,0 +1,3 @@
Wrn:
Err:
Cannot find icon:
-69
View File
@@ -1,69 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
files: |
(?x)^(
src/Base|
src/Main|
src/Tools|
tests/src|
src/Mod/AddonManager|
src/Mod/Assembly|
src/Mod/CAM|
src/Mod/Cloud|
src/Mod/Drawing|
src/Mod/Fem|
src/Mod/Help|
src/Mod/Import|
src/Mod/Inspection|
src/Mod/JtReader|
src/Mod/Measure|
src/Mod/Mesh|
src/Mod/MeshPart|
src/Mod/Plot|
src/Mod/Points|
src/Mod/ReverseEngineering|
src/Mod/Robot|
src/Mod/Show|
src/Mod/Sketcher|
src/Mod/Spreadsheet|
src/Mod/Start|
src/Mod/Surface|
src/Mod/Test|
src/Mod/Tux|
src/Mod/Web
)
exclude: |
(?x)^(
.*vcproj.*|
.*vcxproj.*|
src/App/ExpressionParser.tab.c|
src/App/ExpressionParser.tab.h|
src/App/ExpressionParser.y|
src/App/lex.ExpressionParser.c|
src/Mod/Import/App/SCL|
src/Mod/Import/App/SCL_output|
src/Mod/Mesh/App/TestData|
src/Mod/Mesh/App/WildMagic4|
src/Mod/Robot/App/kdl_cp|
src/Mod/Robot/Lib
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: mixed-line-ending
- repo: https://github.com/psf/black
rev: b965c2a5026f8ba399283ba3e01898b012853c79 # frozen: 24.8.0
hooks:
- id: black
args: ['--line-length', '100']
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 7d85583be209cb547946c82fbe51f4bc5dd1d017 # frozen: v18.1.8
hooks:
- id: clang-format
+9 -9
View File
@@ -3,7 +3,7 @@
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=yes
analyse-fallback-blocks=no
# Load and enable all available extensions. Use --list-extensions to see a list
# all available extensions.
@@ -57,7 +57,7 @@ ignore-patterns=^\.#
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=FreeCAD,FreeCADGui
ignored-modules=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
@@ -82,7 +82,7 @@ persistent=yes
# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.8
py-version=3.10
# Discover python modules and packages in the file system subtree.
recursive=no
@@ -227,7 +227,7 @@ const-naming-style=UPPER_CASE
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=4
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
@@ -352,7 +352,7 @@ ignored-parents=
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=15
max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
@@ -376,14 +376,14 @@ max-returns=6
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=1
min-public-methods=2
[EXCEPTIONS]
# Exceptions that will emit a warning when caught.
overgeneral-exceptions=builtins.BaseException,
builtins.Exception
overgeneral-exceptions=BaseException,
Exception
[FORMAT]
@@ -426,7 +426,7 @@ allow-any-import-level=
allow-wildcard-with-all=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=PySide2
deprecated-modules=
# Output a graph (.gv or any supported image format) of external dependencies
# to the given file (report RP0402 must not be disabled).
Executable
+357
View File
@@ -0,0 +1,357 @@
######
#
# Travis-CI configuration file for FreeCAD.
#
# This build configuration will build and test FreeCAD on both Linux
# and Mac OS X. For Mac OS X, this configuration will also package
# and deploy the build to GitHub provided the following prerequisites
# are satisfied:
#
# GH_TOKEN is defined as a secure environment variable and contains a
# a valid GitHub OAUTH token with repo_deployment scope.
# NOTE: Define this env using the Travis-CI Repo Settings UI
#
# FREECAD_RELEASE: A GitHub Release with this identifier exists in the
# repo. The Travis job will deploy the OS X build to this
# GitHub release name as a release asset.
#
# DEPLOY: Repo setting to deploy (defaults to no deploy to reduce
# Travis build times. Set DEPLOY=1 to enable in repo settings.
######
env:
global:
- GENERATOR="Unix Makefiles"
- CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release}
# - FREECAD_RELEASE="0.18"
# - DEPLOY_RELEASE=${DEPLOY_RELEASE:-$FREECAD_RELEASE}
# - OSX_PORTS_CACHE=${OSX_PORTS_CACHE:-FreeCAD/FreeCAD-ports-cache}
# - DEPLOY=${DEPLOY:-0}
# jobs:
# chunk.io key (if needed, obtain it with Yorik, PrzemoF, Kunda1)
# secure: MJu0ZU/9Yqut6bUkHoSrXTV/c/WhCLR0KnHKCsnEU081PYoukzH6ngzgKk7/trAH2In080d/ra4B2OmTNl/LAgV6DXKFY9dO1aG8QwcrHgaMPf0pHYUy/OfwQSFYFByQDV2OEMAHcIWc/dtNkzK2QUi44Kn7d0GtSEiN4s816lriWtjg0vmEGAU8MjvcAGss4gKyn05Xm1NUCYPKgpgIHsywLbpE76lv0eOYoosEuKv5Q9Pb4FMQts02+JUlqE8eY4ZZ3nV8iQbgIDdseOSA7Ixn05zWjU/ZRZ74TrYxMnzfUAwQcJe9OcqoESq+pPWQt5HYG66VmeVxQim1gmsiDASH51U/nswKt0Q4bISj3tVk0YZMFV8Ax+SzPvLEmFZJQGfgO1mg7HdNcz9N9G5JHPawrV19DwYIEFbAw8MCSAoIXFOcPQZUWXCbtjm7NO9vCjMrqyVJMDD9L8omvQajHoajuHbOT8KB250gFokeLj3z8yu++Tz+IrZX5inUMrXsARVt/ALXpi8rJPXmoFMpMUjyWmDPqPWlnqUhLtTtEtKpuOWP8ZnWVwkg4QYOUhCy95C1okJSGkG+ylHWncWfY4mS+UBT525laoh+GOhH+sRW+p2xkI21xGFRqg1oHjjgY1yIYF6nnSHPzxMBRYmZwagyXsjkFG5FPMWR2oYk0Yg
git:
depth: 5000
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/479456663cdf5c84e4d8
on_success: always
on_failure: always
on_start: change
# Inject osx build into matrix - needed to specify image/dist
jobs:
# allow_failures:
# - python: 3.7
fast_finish: true # https://blog.travis-ci.com/2013-11-27-fast-finishing-builds
include:
- if: type != pull_request
os: linux
dist: bionic
language: cpp
compiler: clang
cache: ccache
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-10
env:
- CC=clang-10
- CXX=clang++-10
- CMAKE_ARGS="-DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON"
- CACHE_NAME=JOB1
- os: linux
dist: bionic
language: cpp
compiler: gcc-10
cache: ccache
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- gcc-10
- g++-10
env:
- CC=gcc-10
- CXX=g++-10
- CC_FOR_BUILD=gcc-10
- CXX_FOR_BUILD=g++-10
- CMAKE_ARGS="-DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/cc -DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON"
- CACHE_NAME=JOB2
# - os: osx
# osx_image: xcode11.6
# language: cpp
# cache:
# - ccache: true
# - directories:
# - $HOME/.ccache
# - $HOME/Library/Caches/Homebrew
# - /usr/local/Homebrew
# env:
# - CMAKE_OPTS="-DBUILD_QT5=ON -DBUILD_ENABLE_CXX_STD='C++17' -DUSE_PYTHON3=1 -DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations' -DBUILD_FEM_NETGEN=1 -DBUILD_FEM=1 -DBUILD_TECHDRAW=0 -DCMAKE_PREFIX_PATH='/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources' -DBUILD_FEM_NETGEN:BOOL=ON -DFREECAD_USE_EXTERNAL_KDL=ON -DCMAKE_BUILD_TYPE=Release"
# - PATH=/usr/local/bin:$PATH
# - CACHE_NAME=OSX1
- os: windows
language: cpp
env:
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=OFF -DFREECAD_RELEASE_PDB=OFF -DFREECAD_RELEASE_SEH=OFF"
- GENERATOR="Visual Studio 15 2017 Win64"
- PYTHON_MAJOR_VERSION=3
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
- TEST_PATH="C:\Users\travis\build\FreeCAD\FreeCAD\build\bin"
- CLCACHE_PATH="C:\Users\travis\build\FreeCAD\FreeCAD"
- VS15=true
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- CCACHE_DIR=$HOME/.ccache
- CACHE_NAME=JOB5
# enable this if clcache extended log is needed
#- CLCACHE_LOG=1
cache:
directories:
- $HOME/clcache
# - language: python
# python: 3.7
# dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
# before_install: true
# install: python3 -m pip install flake8
# # fail the build if there are Python syntax errors or undefined names
# script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
before_install:
# - eval "$(curl -fsSL "https://raw.githubusercontent.com/${OSX_PORTS_CACHE}/v${FREECAD_RELEASE}/travis-helpers.sh")"
- |
case "${TRAVIS_OS_NAME}" in
"linux")
# Daily PPA for OCCT, Pivy, Netgen, PySide ... packages
sudo apt-add-repository -y ppa:freecad-maintainers/freecad-daily
sudo apt-get update -qq
# Build deps
sudo apt-get install -y --no-install-recommends \
python-dev \
python-pyside \
python-matplotlib \
python3-dev \
python3-pyside \
python3-matplotlib \
libboost1.65-dev \
libboost-filesystem1.65-dev \
libboost-program-options1.65-dev \
libboost-python1.65-dev \
libboost-regex1.65-dev \
libboost-signals1.65-dev \
libboost-system1.65-dev \
libboost-thread1.65-dev \
libxerces-c-dev \
libocct-data-exchange-dev \
libocct-ocaf-dev \
libocct-visualization-dev \
libvtk7-dev \
libmedc-dev \
pybind11-dev \
swig \
qt4-qmake \
libqt4-opengl-dev \
libqtwebkit-dev \
qtbase5-dev \
libqt5xmlpatterns5-dev \
libqt5svg5-dev \
libqt5opengl5-dev \
qttools5-dev \
qtwebengine5-dev \
libcoin80-dev \
libpyside-dev \
libpyside2-dev \
libshiboken-dev \
libshiboken2-dev \
pyside-tools \
pyside2-tools \
doxygen \
graphviz \
libnglib-dev \
netgen \
netgen-headers \
libmetis-dev \
libspnav-dev
# Runtime deps
sudo apt-get install -y --no-install-recommends freecad-daily-python3 python-pivy python3-pivy python-ply python3-ply
# Use newer Eigen to suppress warnings
# https://github.com/FreeCAD/FreeCAD/pull/3485
wget http://mirrors.kernel.org/ubuntu/pool/universe/e/eigen3/libeigen3-dev_3.3.7-2_all.deb
sudo dpkg -i libeigen3-dev_3.3.7-2_all.deb
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
export INSTALLED_APP_PATH="/usr/local/bin/FreeCAD"
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/netgen/:$LD_LIRBARY_PATH
;;
"osx")
xcodebuild -version -sdk
brew --config
brew install ccache
brew install coreutils
brew update >/dev/null
brew --config
brew update
brew upgrade
brew install python@3.9
brew unlink python@3.8
brew link --overwrite --force python@3.9
rm /usr/local/bin/python
ln -s /usr/local/bin/python3 /usr/local/bin/python
pip3 install six
pip3 install pyyaml
pip3 install ply
export PATH=/usr/local/bin:$PATH
brew reinstall vtk@8.2
brew link --force vtk@8.2
which python
python --version
brew install boost
brew install boost-python3
brew tap FreeCAD/freecad
brew install freecad/freecad/coin
brew install freecad/freecad/nglib
brew install freecad/freecad/med-file
brew install freecad/freecad/opencamlib
brew install freecad/freecad/shiboken2
brew install freecad/freecad/pyside2
brew install freecad/freecad/pyside2-tools
brew install freecad/freecad/pivy
brew install freecad/freecad/matplotlib
##Install the 3DConnexion frameworks
if [ ! -d /Library/Frameworks/3DconnexionClient.framework ]; then
curl -o /tmp/3dFW.dmg -L 'https://download.3dconnexion.com/drivers/mac/10-6-6_360DF97D-ED08-4ccf-A55E-0BF905E58476/3DxWareMac_v10-6-6_r3234.dmg'
hdiutil attach -readonly /tmp/3dFW.dmg
sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target /
diskutil eject /Volumes/3Dconnexion\ Software
fi
export CMAKE_OPTS="${CMAKE_OPTS} -DFREECAD_CREATE_MAC_APP=OFF"
export INSTALLED_APP_PATH="/usr/local/MacOS/FreeCAD"
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_USE_EXTERNAL_KDL=ON"
brew link --overwrite matplotlib
if [ -f "/usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx" ]; then
sed '1,$s/\[\[nodiscard\]\]//' /usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx > /tmp/Standard_Macro.hxx && cp /tmp/Standard_Macro.hxx /usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx ;
fi
;;
"windows")
#choco install -y python
#py -m pip install --quiet --upgrade pip
#py -m pip install git+https://github.com/frerich/clcache.git@v4.2.0
curl -L https://github.com/frerich/clcache/releases/download/v4.2.0/clcache-4.2.0.zip --output clcache-4.2.0.zip
7z x clcache-4.2.0.zip > /dev/null
export PATH=$CLCACHE_PATH:$PATH
export PATH=$TEST_PATH:$PATH
#reset clcache hit stats
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -z'
# clcache stats before compilation
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s'
curl -L https://github.com/FreeCAD/FreeCAD/releases/download/0.19.1/FreeCADLibs_12.5.3_x64_VC17.7z --output FreeCADLibs.7z
7z x FreeCADLibs.7z -oFreeCADLibs > /dev/null
rm -f FreeCADLibs.7z
export FREECAD_LIBPACK_DIR="$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17"
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_LIBPACK_DIR=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17 -DPYTHON_EXECUTABLE=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17\bin\python.exe \
-DBUILD_QT5=TRUE"
export PATH=$MSBUILD_PATH:$PATH
;;
*)
echo "Invalid or unsupported operating system ${TRAVIS_OS_NAME}"
exit 1
;;
esac
install:
####
# Build FreeCAD with cmake options set above for each platform
##
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/local/bin:/usr/local/opt/ccache/libexec:$PATH"; fi
- echo ${CMAKE_ARGS}
- mkdir build && cd build && cmake -Wno-dev -G"${GENERATOR}" ${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../
script:
####
# Install FreeCAD and run unit tests. Test failures will fail the build
##
# MSBuild.exe /m FreeCAD.sln
- |
if [ "${TRAVIS_OS_NAME}" == "windows" ]; then
# https://travis-ci.community/t/vcvarsall-bat-freezes-on-new-1809-based-windows-images/7098/6
# call msbuild using clcache
#cmd.exe //C '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 && MSBuild.exe FreeCAD.sln /p:CLToolExe=clcache.exe /p:TrackFileAccess=false /p:CLToolPath=C:\Users\travis\build\FreeCAD\FreeCAD /m:2 /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=x64'
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\.travis\build.bat'
# ls -lahR
mkdir bin/
mv ../FreeCADLibs/FreeCADLibs_12.5.3_x64_VC17/bin/* bin/
du -hs bin/
# show clcache hit stats
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s'
# run the tests
#cmd.exe //C 'cd C:\Users\travis\build\FreeCAD\FreeCAD\build\bin && FreeCADCmd.exe --run-test 0'
# Make build fail if ANY of the following fails
#set -ev
winpty.exe -Xallow-non-tty -Xplain /C/Users/travis/build/FreeCAD/FreeCAD/build/bin/FreeCADCmd.exe --run-test 0 | tee runlog.txt
grep -q FAILED runlog.txt ; [ $? == 1 ] && echo "Build succeeded and tests passed!" || ( echo "Tests failed!" && false )
else
# Stop compiling (GCC) after 2 hrs 50 min (3 hrs limit).
# Preserves created ccache for the next build job.
# if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi
# if [ "${TRAVIS_OS_NAME}" == "osx" ]; then sudo gtimeout -s KILL make -j2 install; fi
cat $HOME/.ccache/ccache.conf
ccache -z -s
df -h
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then export PATH="/usr/local/opt/ccacche/libexec:$PATH"; sudo gtimeout -s KILL 7200 make -j2; [ $? == 124 ] && { ccache -s; return 0; } fi
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi
sudo make -j2 install
ccache -s
${INSTALLED_APP_PATH} --console --run-test 0 || travis_terminate 1
${INSTALLED_APP_PATH} --log-file /tmp/FreeCAD_installed.log &
sleep 10 && pkill FreeCAD
cat /tmp/FreeCAD_installed.log
grep --file=../.log_errors /tmp/FreeCAD_installed.log ; [ $? == 1 ] && echo "No errors from .log_errors file found in the log after start from /usr/local/bin" || ( echo "Error from .log_errors found!" && false )
fi
#after_success:
# Package and deploy the build to GitHub. This will only run for builds on
# master (i.e. pull requests are only built and tested but not deployed).
#
# GH_TOKEN must be set in order to deploy releases to GitHub
#
#- |
# if [ "${TRAVIS_OS_NAME}" == "osx" -a "${TRAVIS_PULL_REQUEST}" == "false" -a "${DEPLOY}" == "1" ]; then
# brew ls --versions jq || brew install jq
# npm install -g appdmg
# export VSN=$(python ${TRAVIS_BUILD_DIR}/src/Tools/ArchiveNameFromVersionHeader.py ${TRAVIS_BUILD_DIR}/build/src/Build/Version.h)
# export DEPLOYMENT_ARCHIVE=${VSN}-${QT}.dmg
# appdmg ${TRAVIS_BUILD_DIR}/src/MacAppBundle/DiskImage/layout.json "${DEPLOYMENT_ARCHIVE}"
# deployContext=$(create_helper_context repo=${TRAVIS_REPO_SLUG} auth_token=${GH_TOKEN} release=${DEPLOY_RELEASE})
# gitHub_deploy_asset_to_release_named $deployContext ${DEPLOYMENT_ARCHIVE}
# gitHub_prune_assets_for_release_named $deployContext "-${QT}" 1
# fi
+6
View File
@@ -0,0 +1,6 @@
echo on
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
MSBuild.exe FreeCAD.sln /p:CLToolExe=clcache.exe /p:TrackFileAccess=false /p:CLToolPath=C:\Users\travis\build\FreeCAD\FreeCAD /m:2 /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=x64
@@ -222,7 +222,7 @@ cmake \
-DBUILD_FEM=1 \
-DBUILD_TECHDRAW=0 \
-DFREECAD_USE_EXTERNAL_KDL=ON \
-DFREECAD_CREATE_MAC_APP=OFF \
-DFREECAD_CREATE_MAC_APP=OFF
-DCMAKE_PREFIX_PATH="/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources;/usr/local/opt/vtk@8.2/lib/cmake;/usr/local;" .
```
@@ -294,6 +294,6 @@ mv freecadd freecad;
[lnk1]: <http://brew.sh>
[lnk2]: <https://github.com/FreeCAD/homebrew-freecad>
[lnk3]: <https://forum.freecad.org/viewtopic.php?f=4&t=51981#p446796>
[lnk3]: <https://forum.freecadweb.org/viewtopic.php?f=4&t=51981#p446796>
[lnk4]: <https://gist.github.com/ipatch/6116824ab1f2a99b526cb07e43317b91#gistcomment-3577066>
[lnk5]: <https://github.com/Homebrew/homebrew-core/pull/67615>
+14 -42
View File
@@ -1,7 +1,5 @@
# As of January 2023 we require CMake 3.16.3
# see https://forum.freecad.org/viewtopic.php?f=10&t=72173
# for further info why
cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR)
# March 2021, the oldest we have to support : Ununtu 18.04 LTS
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
# policy CMP0072 was introduced with CMake 3.11
# relates to FindOpenGL module
@@ -10,31 +8,21 @@ if (POLICY CMP0072)
set(OpenGL_GL_PREFERENCE LEGACY)
endif(POLICY CMP0072)
# FindPythonInterp and FindPythonLibs modules are deprecated.
# Currently, they are still used by shiboken's CMake files
if (POLICY CMP0148)
cmake_policy(SET CMP0148 OLD)
endif()
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
if(FREECAD_USE_CCACHE)
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
if(CCACHE_PROGRAM)
message(STATUS "Using ccache found at: " ${CCACHE_PROGRAM})
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
project(FreeCAD)
set(PACKAGE_VERSION_MAJOR "1")
set(PACKAGE_VERSION_MINOR "0")
set(PACKAGE_VERSION_PATCH "2") # number of patch release (e.g. "4" for the 0.18.4 release)
set(PACKAGE_VERSION_NAME "Vulcan")
set(PACKAGE_VERSION_MAJOR "0")
set(PACKAGE_VERSION_MINOR "20")
set(PACKAGE_VERSION_PATCH "2")
set(PACKAGE_VERSION_SUFFIX "") # either "dev" for development snapshot or "" (empty string)
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
set(FREECAD_VERSION_PATCH "2") # number of patch release (e.g. "4" for the 0.18.4 release)
set(FREECAD_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}")
@@ -53,9 +41,7 @@ InitializeFreeCADBuildOptions()
CheckInterModuleDependencies()
FreeCADLibpackChecks()
SetupDoxygen()
SetupLibFmt()
SetupYamlCpp()
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIBPACK_CHECKFILE_VERSION)
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
SetupPython()
SetupPCL()
SetupPybind11()
@@ -69,8 +55,8 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIB
# OPENGL_gl_LIBRARY empty that results into linker errors
SetupOpenGL()
endif(BUILD_GUI)
SetupBoost()
SetupSalomeSMESH()
SetupBoost()
if (BUILD_FEM_NETGEN)
find_package(NETGEN)
endif(BUILD_FEM_NETGEN)
@@ -89,7 +75,7 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIB
SetupShibokenAndPyside()
SetupMatplotlib()
endif(BUILD_GUI)
endif()
endif(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
if(BUILD_VR)
find_package(Rift)
@@ -105,18 +91,4 @@ BuildAndInstallDesignerPlugin()
CreatePackagingTargets()
if(MSVC AND FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
CopyLibpackDirectories()
endif()
if (ENABLE_DEVELOPER_TESTS)
include(CTest)
enable_testing()
add_subdirectory(tests)
endif()
PrintFinalReport()
message("\n=================================================\n"
"Now run 'cmake --build ${CMAKE_BINARY_DIR}' to build ${PROJECT_NAME}\n"
"=================================================\n")
-299
View File
@@ -1,299 +0,0 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 16,
"patch": 3
},
"configurePresets": [
{
"name": "common",
"hidden": true,
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": {
"type": "BOOL",
"value": "ON"
}
}
},
{
"name": "debug",
"displayName": "Debug",
"description": "Default debug profile",
"binaryDir": "${sourceDir}/build/debug",
"inherits": [
"common"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Debug"
}
}
},
{
"name": "release",
"displayName": "Release",
"description": "Default release profile",
"binaryDir": "${sourceDir}/build/release",
"inherits": [
"common"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Release"
}
}
},
{
"name": "conda",
"hidden": true,
"generator": "Ninja",
"cacheVariables": {
"BUILD_FEM_NETGEN": {
"type": "BOOL",
"value": "ON"
},
"BUILD_WITH_CONDA": {
"type": "BOOL",
"value": "ON"
},
"ENABLE_DEVELOPER_TESTS": {
"type": "BOOL",
"value": "ON"
},
"FREECAD_LIBPACK_USE": {
"type": "BOOL",
"value": "OFF"
},
"FREECAD_USE_EXTERNAL_FMT": {
"type": "BOOL",
"value": "ON"
},
"FREECAD_USE_EXTERNAL_SMESH": {
"type": "BOOL",
"value": "ON"
},
"FREECAD_USE_PCH": {
"type": "BOOL",
"value": "OFF"
},
"FREECAD_USE_PCL": {
"type": "BOOL",
"value": "ON"
},
"FREECAD_USE_PYBIND11": {
"type": "BOOL",
"value": "ON"
},
"OCCT_CMAKE_FALLBACK": {
"type": "BOOL",
"value": "ON"
},
"QT_HOST_PATH": {
"type": "PATH",
"value": "$env{CONDA_PREFIX}"
}
}
},
{
"name": "conda-linux",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
"cacheVariables": {
"CMAKE_INCLUDE_PATH": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/include"
},
"CMAKE_INSTALL_LIBDIR": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/lib"
},
"CMAKE_INSTALL_PREFIX": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}"
},
"CMAKE_LIBRARY_PATH":{
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/lib"
},
"CMAKE_PREFIX_PATH": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}"
},
"OCC_INCLUDE_DIR": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/include/opencascade"
}
}
},
{
"name": "conda-macos",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
"cacheVariables": {
"CMAKE_IGNORE_PREFIX_PATH": {
"type": "STRING",
"value": "/opt/homebrew;/usr/local/homebrew"
},
"CMAKE_INCLUDE_PATH": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/include"
},
"CMAKE_INSTALL_LIBDIR": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/lib"
},
"CMAKE_INSTALL_PREFIX": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}"
},
"CMAKE_LIBRARY_PATH":{
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/lib"
},
"CMAKE_PREFIX_PATH": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}"
},
"OCC_INCLUDE_DIR": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/include/opencascade"
}
}
},
{
"name": "conda-windows",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"cmakeExecutable": "${sourceDir}/conda/cmake.cmd",
"cacheVariables": {
"CMAKE_INCLUDE_PATH": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/Library/include"
},
"CMAKE_INSTALL_LIBDIR": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/Library/lib"
},
"CMAKE_INSTALL_PREFIX": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/Library"
},
"CMAKE_LIBRARY_PATH":{
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/Library/lib"
},
"CMAKE_PREFIX_PATH": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/Library"
},
"OCC_INCLUDE_DIR": {
"type": "FILEPATH",
"value": "$env{CONDA_PREFIX}/Library/include/opencascade"
}
}
},
{
"name": "conda-debug",
"hidden": true,
"displayName": "Conda Debug",
"description": "Conda debug profile",
"inherits": [
"debug",
"conda"
]
},
{
"name": "conda-release",
"hidden": true,
"displayName": "Conda Release",
"description": "Conda release profile",
"inherits": [
"release",
"conda"
]
},
{
"name": "conda-linux-debug",
"displayName": "Conda Debug",
"description": "Conda debug profile",
"inherits": [
"conda-debug",
"conda-linux"
]
},
{
"name": "conda-linux-release",
"displayName": "Conda Release",
"description": "Conda release profile",
"inherits": [
"conda-release",
"conda-linux"
]
},
{
"name": "conda-macos-debug",
"displayName": "Conda Debug",
"description": "Conda debug profile",
"inherits": [
"conda-debug",
"conda-macos"
]
},
{
"name": "conda-macos-release",
"displayName": "Conda Release",
"description": "Conda release profile",
"inherits": [
"conda-release",
"conda-macos"
]
},
{
"name": "conda-windows-debug",
"displayName": "Conda Debug",
"description": "Conda debug profile",
"inherits": [
"conda-debug",
"conda-windows"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "RelWithDebInfo"
}
}
},
{
"name": "conda-windows-release",
"displayName": "Conda Release",
"description": "Conda release profile",
"inherits": [
"conda-release",
"conda-windows"
],
"cacheVariables": {
"FREECAD_RELEASE_PDB": {
"type": "BOOL",
"value": "OFF"
}
}
}
]
}
+2 -2
View File
@@ -55,8 +55,8 @@ further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting any of the community admins or moderators at
https://forum.freecad.org/memberlist.php?mode=team . All
reported by contacting any of the community admins or moderators at
https://forum.freecadweb.org/memberlist.php?mode=team . All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
-104
View File
@@ -1,104 +0,0 @@
# FreeCAD Contribution Process (FCP)
FreeCAD's contribution process is inspired by the Collective Code Construction Contract which itself is an evolution of the github.com Fork and Pull Model.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
## 0. Status
FreeCAD is in a transition period. The following are to be regarded as GUIDELINES for contribution submission and acceptance. For historical reasons, the actual process MAY diverge from this process during the transition. Such deviations SHOULD be noted and discussed whenever possible.
## 1. Goals
The FreeCAD Contribution Process is expressed here with the following specific goals in mind:
1. To provide transparency and fairness in the contribution process.
2. To allow contributions to be included as quickly as possible.
3. To preserve and improve the code quality while encouraging appropriate experimentation and risk-taking.
4. To minimize dependence on individual Contributors by encouraging a large pool of active Contributors.
5. To be inclusive of many viewpoints and to harness a diverse set of skills.
6. To provide an encouraging environment where Contributors learn and improve their skills.
7. To protect the free and open nature of the FreeCAD project.
## 2. Fundamentals
1. FreeCAD uses the git distributed revision control system.
2. Source code for the main application and related subprojects is hosted on github.com in the FreeCAD organization.
3. Problems are discrete, well-defined limitations or bugs.
4. FreeCAD uses GitHub's issue-tracking system to track problems and contributions. For help requests and general discussions, use the project forum.
5. Contributions are sets of code changes that resolve a single problem.
6. FreeCAD uses the Pull Request workflow for evaluating and accepting contributions.
## 3. Roles
1. "User": A member of the wider FreeCAD community who uses the software.
2. "Contributor": A person who submits a contribution that resolves a previously identified problem. Contributors do not have commit access to the repository unless they are also Maintainers. Everyone, without distinction or discrimination, SHALL have an equal right to become a Contributor.
3. "Maintainer": A person who merges contributions. Maintainers may or may not be Contributors. Their role is to enforce the process. Maintainers have commit access to the repository.
4. "Administrator": Administrators have additional authority to maintain the list of designated Maintainers.
## 4. Licensing, Ownership, and Credit
1. FreeCAD is distributed under the Lesser General Public License, version 2, or superior (LGPL2+). Additional details can be found in the LICENSE file.
2. All contributions to FreeCAD MUST use a compatible license.
3. All contributions are owned by their authors unless assigned to another.
4. FreeCAD does not have a mandatory copyright assignment policy.
5. A Contributor who wishes to be identified in the Credits section of the application "About" dialog is responsible for identifying themselves. They should modify the Contributors file and submit a PR with a single commit for this modification only. The contributors file is found at https://github.com/FreeCAD/FreeCAD/blob/main/src/Doc/CONTRIBUTORS
6. A contributor who does not wish to assume the copyright of their contribution MAY choose to assign it to the [FreeCAD project association](https://fpa.freecad.org) by mentioning **Copyright (c) 2022 The FreeCAD project association <fpa@freecad.org>** in the file's license code block.
## 5. Contribution Requirements
1. Contributions are submitted in the form of Pull Requests (PR).
2. Maintainers and Contributors MUST have a GitHub account and SHOULD use their real names or a well-known alias.
3. If the GitHub username differs from the username on the FreeCAD Forum, effort SHOULD be taken to avoid confusion.
4. A PR SHOULD be a minimal and accurate answer to exactly one identified and agreed-on problem.
5. A PR SHOULD refrain from adding additional dependencies to the FreeCAD project unless no other option is available.
6. Code submissions MUST adhere to the code style guidelines of the project if these are defined.
7. If a PR contains multiple commits, each commit MUST compile cleanly when merged with all previous commits of the same PR. Each commit SHOULD add value to the history of the project. Checkpoint commits SHOULD be squashed.
8. A PR SHALL NOT include non-trivial code from other projects unless the Contributor is the original author of that code.
9. A PR MUST compile cleanly and pass project self-tests on all target platforms.
10. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
11. The PR message MUST consist of a single short line, the PR Title, summarizing the problem being solved, followed by a blank line and then the proposed solution in the Body. If a PR consists of more than one commit, the PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
12. A “Valid PR” is one which satisfies the above requirements.
## 6. Process
1. Change on the project follows the pattern of accurately identifying problems and applying minimal, accurate solutions to these problems.
2. To request changes, a User logs an issue on the project GitHub issue tracker.
3. The User or Contributor SHOULD write the issue by describing the problem they face or observe. Links to the forum or other resources are permitted but the issue SHOULD be complete and accurate and SHOULD NOT require the reader to visit the forum or any other platform to understand what is being described.
4. Issue authors SHOULD strive to describe the minimum acceptable condition.
5. Issue authors SHOULD focus on User tasks and avoid comparisons to other software solutions.
6. The User or Contributor SHOULD seek consensus on the accuracy of their observation and the value of solving the problem.
7. To submit a solution to a problem, a Contributor SHALL create a pull request back to the project.
8. Contributors and Maintainers SHALL NOT commit changes directly to the target branch.
9. To discuss a proposed solution, Users MAY comment on the Pull Request in GitHub. Forum conversations regarding the solution SHOULD be discouraged and conversation redirected to the Pull Request or the related issue.
10. To accept or reject a Pull Request, a Maintainer SHALL use GitHub's interface.
11. Maintainers SHOULD NOT merge their own PRs except:
1. in exceptional cases, such as non-responsiveness from other Maintainers for an extended period.
2. If the Maintainer is also the primary developer of the workbench or subsystem.
12. Maintainers SHALL merge valid PRs from other Contributors rapidly.
13. Maintainers MAY, at their discretion merge PRs that have not met all criteria to be considered valid to:
1. end fruitless discussions
2. capture toxic contributions in the historical record
3. engage with the Contributor on improving their contribution quality.
14. Maintainers SHALL NOT make value judgments on correct contributions.
15. Any Contributor who has value judgments on a PR SHOULD express these via their own PR.
16. The User who created an issue SHOULD close the issue after checking the PR is successful.
17. Maintainers SHOULD close issues that are left open without action or update for an unreasonable period.
## 7. Branches and Releases
1. The project SHALL have one branch (“main”) that always holds the latest in-progress version and SHOULD always build.
2. The project SHALL NOT use topic branches for any reason. Personal forks MAY use topic branches.
3. To make a stable release a Maintainer SHALL tag the repository. Stable releases SHALL always be released from the repository main branch.
## 8. Project Administration
1. Project Administrators are those individuals who are members of the FreeCAD Github organization and have the role of 'owner'. They have the task of administering the organization including adding and removing individuals from various teams.
2. Project Administrator is a technical role necessitated by the GitHub platform. Except for the specific exceptions listed below, the Project Administrators do not make the decision about individual team members. Rather, they carry out the collective wishes of the Maintainers team. Project Administrators will be selected from the Maintainers team by the Maintainers themselves.
3. To ensure continuity there SHALL be at least four Project Administrators at all times.
4. The project Administrators will manage the set of project Maintainers. They SHALL maintain a sufficiently large pool of Maintainers to ensure their succession and permit timely review of contributions. If the pool of Maintainers is insufficient, the Project Administrators will request that the Maintainers select additional individuals to add.
5. Contributors who have a history of successful PRs and have demonstrated continued professionalism should be invited to be Maintainers.
6. Administrators SHOULD remove Maintainers who are inactive for an extended period, or who repeatedly fail to apply this process accurately.
7. The list of Maintainers SHALL be publicly accessible and reflective of current activity on the project.
8. Administrators SHALL act expediently to protect the FreeCAD infrastructure and resources.
9. Administrators SHOULD block or ban “bad actors” who cause stress, animosity, or confusion to others in the project. This SHOULD be done after public discussion, with a chance for all parties to speak. A bad actor is someone who repeatedly ignores the rules and culture of the project, who is hostile or offensive, who impedes the productive exchange of information, and who is unable to self-correct their behavior when asked to do so by others.
+1106
View File
File diff suppressed because it is too large Load Diff
+55
View File
@@ -0,0 +1,55 @@
#ifndef LIBRARY_VERSIONS_H
#define LIBRARY_VERSIONS_H
/* LibraryVersions.h. Generated from LibraryVersions.h.cmake by cmake. */
#cmakedefine HAVE_OCC_VERSION
#if defined(HAVE_OCC_VERSION)
# include <${OCC_INCLUDE_DIR}/Standard_Version.hxx>
#endif
/* No need for Boost (version info is always included in the source) */
/* No need for Python (version info is always included in the source) */
/* No need for Qt (version info is always included in the source) */
/* No need for zlib (version info is always included in the source) */
// No CMake version info for SMESH, libarea, Zipios, or KDL
// Coin3D
constexpr char * FC_COIN3D_VERSION = "${COIN3D_VERSION}";
// Eigen3
constexpr char * FC_EIGEN3_VERSION = "${EIGEN3_VERSION}";
// FreeType
constexpr char * FC_FREETYPE_VERSION = "${FREETYPE_VERSION_STRING}";
// pcl
constexpr char * FC_PCL_VERSION = "${PCL_VERSION}";
// PyCXX
constexpr char * FC_PYCXX_VERSION = "${PYCXX_VERSION}";
// PySide
constexpr char * FC_PYSIDE_VERSION = "${PySide2_VERSION}";
// PyBind
constexpr char * FC_PYBIND11_VERSION = "${pybind11_VERSION}";
// Shiboken
constexpr char * FC_SHIBOKEN_VERSION = "${Shiboken2_VERSION}";
// vtk
constexpr char * FC_VTK_VERSION = "${VTK_VERSION}";
// Xerces-C
constexpr char * FC_XERCESC_VERSION = "${XercesC_VERSION}";
// Pivy
constexpr char * FC_PIVY_VERSION = "${PIVY_VERSION}";
#endif // LIBRARY_VERSIONS_H
-32
View File
@@ -1,32 +0,0 @@
# FreeCAD Privacy Policy
The FreeCAD application does not collect, transmit, share or use any Personal Data.
FreeCAD is community-developed Free Software. The community does not condone the unauthorized usage of private data, so our software does not gather or send personal data.
The FreeCAD website is mostly static, it does not contain any trackers, neither ours nor third-party. The website uses cookies to remember logged in status, timezone and other
data related to navigating the site.
The website does not contain advertisements.
The software does not contain advertisements or trackers either.
## Caveats
FreeCAD is able to load or save files to/from remote servers (for some protocols and platforms). If you choose to load or save a remote file, your IP or other private data might be shared as part of the normal connection flow for the given protocol. This is out of our control and it is up to you to decide whether you trust a remote host.
The FreeCAD eco system includes user developed workbenches. These workbenches can be installed/updated using the Add-on Manager. The Add-on Manager retrieves workbenches from remote servers across the internet. Add-on workbenches are not checked for malicious content. It is your responsibility to decide whether you trust an add-on workbench.
FreeCAD is meant to manipulate CAD files which may contain metadata. It is your responsibility to verify the metadata contained in your files before you share them with others. These files may contain local directory paths which could reveal user names if the user name forms part of the path - as in “C:\MrsCAD\Documents\myFreeCADFile.FCstd”.
FreeCAD can also be used to create and run macros. These are Python scripts that can perform any action that the user can perform on a system. When running a macro from an outside source, it is your responsibility to ensure you trust the author.
While running and for subsequent runs, FreeCAD uses local persistent storage for logs, configuration files, cache, thumbnails, recently accessed files and other information which may contain private data. This stays on local storage.
When reading the online version of the User Manual within FreeCAD, manual contents is requested through HTTPS connections.
FreeCAD is Free Software and therefore may be packaged by other people, who may include additional software or modify the source code. We do not vouch for these third-party packages and cannot tell you what they contain and what they do regarding your privacy. The official packages are explicitly listed in our download page.
- [based on the GIMP privacy policy](https://www.gimp.org/about/privacy.html)
+42 -39
View File
@@ -1,18 +1,17 @@
<a href="https://freecad.org"><img src="/src/Gui/Icons/freecad.svg" height="100px" width="100px"></a>
![Logo](https://www.freecadweb.org/images/logo.png)
### Your own 3D parametric modeler
[Website](https://www.freecad.org) •
[Documentation](https://wiki.freecad.org) •
[Forum](https://forum.freecad.org/) •
[Bug tracker](https://github.com/FreeCAD/FreeCAD/issues) •
[Git repository](https://github.com/FreeCAD/FreeCAD)
[Blog](https://blog.freecad.org)
[Website](https://www.freecadweb.org) •
[Documentation](https://wiki.freecadweb.org) •
[Forum](https://forum.freecadweb.org/) •
[Bug tracker](https://www.freecadweb.org/tracker/) •
[Git repository](https://github.com/FreeCAD/FreeCAD)
[![Release](https://img.shields.io/github/release/freecad/freecad.svg)](https://github.com/freecad/freecad/releases/latest) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad) [![Liberapay](https://img.shields.io/liberapay/receives/FreeCAD.svg?logo=liberapay)](https://liberapay.com/FreeCAD)
[![Release](https://img.shields.io/github/release/freecad/freecad.svg)](https://github.com/freecad/freecad/releases/latest) [![Master][freecad-master-status]][gitlab-branch-master] [![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad) [![Gitter](https://img.shields.io/gitter/room/freecad/freecad.svg)](https://gitter.im/freecad/freecad?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/FreeCAD/FreeCAD.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:python) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/FreeCAD/FreeCAD.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:cpp) [![Liberapay](https://img.shields.io/liberapay/receives/FreeCAD.svg?logo=liberapay)](https://liberapay.com/FreeCAD)
<img src="/.github/images/partdesign.png" width="800"/>
<img src="https://user-images.githubusercontent.com/1828501/174066870-1692005b-f8d7-43fb-a289-6d2f07f73d7f.png" width="800"/>
Overview
--------
@@ -51,7 +50,20 @@ software center application.
For development releases check the [weekly-builds page](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds).
Other options are described at the [wiki Download page](https://wiki.freecad.org/Download).
Other options are described at the [wiki Download page](https://wiki.freecadweb.org/Download).
Build Status
------------
| Master | 0.20 | Translation |
|:------:|:----:|:-----------:|
|[![Master][freecad-master-status]][gitlab-branch-master]|[![0.20][freecad-0.20-status]][gitlab-branch-0.20]|[![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad)|
[freecad-0.20-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/releases/FreeCAD-0-20/pipeline.svg
[freecad-master-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/master/pipeline.svg
[gitlab-branch-0.20]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/releases/FreeCAD-0-20
[gitlab-branch-master]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/master
[travis-builds]: https://travis-ci.org/FreeCAD/FreeCAD/builds
Compiling
---------
@@ -66,37 +78,28 @@ you will usually have to compile them yourself.
The pages below contain up-to-date build instructions:
- [Linux](https://wiki.freecad.org/Compile_on_Linux)
- [Windows](https://wiki.freecad.org/Compile_on_Windows)
- [macOS](https://wiki.freecad.org/Compile_on_MacOS)
- [Cygwin](https://wiki.freecad.org/Compile_on_Cygwin)
- [MinGW](https://wiki.freecad.org/Compile_on_MinGW)
- [Linux](https://wiki.freecadweb.org/Compile_on_Linux)
- [Windows](https://wiki.freecadweb.org/Compile_on_Windows)
- [macOS](https://wiki.freecadweb.org/Compile_on_MacOS)
- [Cygwin](https://wiki.freecadweb.org/Compile_on_Cygwin)
- [MinGW](https://wiki.freecadweb.org/Compile_on_MinGW)
Reporting Issues
---------
To report an issue please:
- Consider posting to the [Forum](https://forum.freecad.org), [Discord](https://discord.com/invite/F4hdxzYZfc) channel, or [Reddit](https://www.reddit.com/r/FreeCAD) to verify the issue;
- Search the existing [issues](https://github.com/FreeCAD/FreeCAD/issues) for potential duplicates;
- Use the most updated stable or [development versions](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds) of FreeCAD;
- Post version info from e.g. `Help > About FreeCAD > Copy to clipboard`;
- Start recording a macro `Macro > Macro recording...` and repeat all steps. Stop recording after the issue occurs and upload the saved macro or copy the macro code in the issue;
- First post to forum to verify the issue;
- Link forum thread to bug tracker ticket and vice-a-versa;
- Use the most updated stable or development versions of FreeCAD;
- Post version info from eg. `Help > About FreeCAD > Copy to clipboard`;
- Post a Step-By-Step explanation on how to recreate the issue;
- Upload an example file (FCStd as ZIP file) to demonstrate the problem;
- Upload an example file to demonstrate problem.
For more detail see:
- [Bug Tracker](https://github.com/FreeCAD/FreeCAD/issues)
- [Reporting Issues and Requesting Features](https://github.com/FreeCAD/FreeCAD/issues/new/choose)
- [Contributing](https://github.com/FreeCAD/FreeCAD/blob/main/CONTRIBUTING.md)
- [Help Forum](https://forum.freecad.org/viewforum.php?f=3)
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
The [FPA](https://fpa.freecad.org) offers developers the opportunity
to apply for a grant to work on projects of their choosing. Check
[jobs and funding](https://blog.freecad.org/jobs/) to know more.
- [Wiki Page about the Bug Tracker](https://wiki.freecadweb.org/Tracker)
- [Bug Tracker](https://tracker.freecadweb.org)
- [Help Forum](https://forum.freecadweb.org/viewforum.php?f=3)
Usage & Getting help
@@ -106,14 +109,14 @@ The FreeCAD wiki contains documentation on
general FreeCAD usage, Python scripting, and development. These
pages might help you get started:
- [Getting started](https://wiki.freecad.org/Getting_started)
- [Features list](https://wiki.freecad.org/Feature_list)
- [Frequent questions](https://wiki.freecad.org/FAQ/en)
- [Workbenches](https://wiki.freecad.org/Workbenches)
- [Scripting](https://wiki.freecad.org/Power_users_hub)
- [Development](https://wiki.freecad.org/Developer_hub)
- [Getting started](https://wiki.freecadweb.org/Getting_started)
- [Features list](https://wiki.freecadweb.org/Feature_list)
- [Frequent questions](https://wiki.freecadweb.org/FAQ/en)
- [Workbenches](https://wiki.freecadweb.org/Workbenches)
- [Scripting](https://wiki.freecadweb.org/Power_users_hub)
- [Development](https://wiki.freecadweb.org/Developer_hub)
The [FreeCAD forum](https://forum.freecad.org) is also a great place
The [FreeCAD forum](https://forum.freecadweb.org) is also a great place
to find help and solve specific problems you might encounter when
learning to use FreeCAD.
-32
View File
@@ -1,32 +0,0 @@
# Security Policy
The FreeCAD project is a FOSS (Free and Open-Source Software) project that has a community of thousands of users and
hundreds of developers worldwide. We encourage responsible reporting of security vulnerabilities that may affect users
of this software, and will endeavor to address these vulnerabilities when they are discovered.
## Bounties
FreeCAD does not have a program to pay bounties for security bugs. If you discover a vulnerability that affects a part
of the FreeCAD project (either directly in FreeCAD, in a library it depends on, or in any of the various other
subprojects such as our website, forums, etc.) we ask you to join the large community of volunteer contributors and
file a report about the issue.
Note that funds may be available from the [FreeCAD Project Association (FPA)](https://fpa.freecad.org) to pursue
security research and/or the development of fixes to any vulnerabilities discovered. However, vulnerabilities held as
hostage in demands for "bounties" will not be entertained. Contact the FPA at fpa@freecad.org for more information.
## Supported Versions
FreeCAD implements security fixes to the current release series, and to the current development on the master branch.
| Version | Supported |
|---------| ------------------ |
| 0.22dev | :white_check_mark: |
| 0.21 | :white_check_mark: |
| < 0.21 | :x: |
## Reporting a Vulnerability
To report a vulnerability use GitHub's security reporting tool:
https://github.com/FreeCAD/FreeCAD/security/advisories/new
@@ -9,6 +9,4 @@
#define SMESH_VERSION_PATCH ${SMESH_VERSION_PATCH}
#define SMESH_VERSION_TWEAK ${SMESH_VERSION_TWEAK}
#define SMESH_VERSION_STR "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}"
#endif // SMESH_VERSION_H
+66
View File
@@ -0,0 +1,66 @@
#version:
image: Visual Studio 2017
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# APPVEYOR_SAVE_CACHE_ON_ERROR: true
generator: "Visual Studio 15 2017 Win64"
ARCH: "Win64"
Compiler: "MSVC2017"
cache: c:\users\appveyor\clcache -> appveyor.yml
configuration:
#- Debug
- Release
clone_depth: 1600
# scripts that are called at very beginning, before repo cloning
#init:
#before_build:
# scripts that run after cloning repository
#todo cleanup libpacks on the FreeCAD-ports-cache repo
install:
- cd C:\projects\freecad
- if [%ARCH%] == [Win64] (appveyor DownloadFile https://github.com/apeltauer/FreeCAD/releases/download/LibPack_12.1/FreeCADLibs_12.1.2_x64_VC15.7z)
- if [%ARCH%] == [Win64] (
powershell -Command 7z x FreeCADLibs_12.1.2_x64_VC15.7z -oFreeCADLibs > nul &&
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat")
- set PATH=c:\Python37;c:\Python37\Scripts;%PATH%
- pip install clcache
- clcache -z
- clcache -s
build_script:
- cd C:\projects\freecad
- mkdir build
- cd build
- cmake -DFREECAD_LIBPACK_DIR=C:\projects\freecad\FreeCADLibs
-DBUILD_FEM_NETGEN=OFF
-DFREECAD_RELEASE_PDB=OFF
-G "%generator%" ..
- mkdir bin
- xcopy C:\projects\freecad\FreeCADLibs\bin C:\projects\freecad\build\bin /E /Q
- ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache)
- msbuild FreeCAD.sln /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /p:CLToolPath=c:\Python37\Scripts\ /m
- ps: fsutil behavior set disablelastaccess 1
- clcache -s
#after_build:
- cd C:\projects\freecad\build\bin\
- FreeCADCmd.exe --run-test 0
#artifacts:
test: off # to avoid discovering tests
#
# The following section automatically uploads artifacts
# whenever a tag is created on the master branch.
#
#deploy:
+91
View File
@@ -0,0 +1,91 @@
##!/usr/bin/env bash
#
# MacOS Build Script for FreeCAD using Conda.
# This is intended for developer use.
#
# Copyright (c) 2020 by Jeffrey Zampieron. All rights reserved.
#
# License: LGPLv2.1
#
# References:
# - Conda: https://conda.io/projects/conda/en/latest/user-guide/install/index.html
# - Conda Build: https://docs.conda.io/projects/conda-build/en/latest/install-conda-build.html
###########################################################################
# Script wide setup.
###########################################################################
# The Conda environment name
FCENV=freecad_dev
# The cmake build directory
HOST=$(uname)
###########################################################################
# Env Checks
###########################################################################
if [[ ${HOST} =~ "Linux" ]]; then
# Linux specific checks here
echo "Linux specific checks..."
elif [[ ${HOST} =~ "Darwin" ]]; then
# OSX specific checks here.
echo "OS X specific checks..."
which xcrun
if [ $? != 0 ]; then
echo "xcrun not found... install XCode command line tools..."
echo "using: xcode-select --install"
exit 1
fi
else
echo "unknown host env... probably won't work. Aborting build."
exit 1
fi
###########################################################################
# Conda Setup
###########################################################################
which conda
if [ $? != 0 ]; then
echo "Failed to find conda executable. Please install."
exit 1
fi
if [[ "${CONDA_DEFAULT_ENV}" =~ "${FCENV}" ]]; then
echo "Already in env"
elif [[ -z "${CONDA_DEFAULT_ENV}" ]]; then
echo "Not in conda env... activating"
eval "$(conda shell.bash hook)"
conda activate ${FCENV}
else
# Assume we are in some other env.
echo "In ${CONDA_DEFAULT_ENV}, attempting switch to ${FCENV}"
eval "$(conda shell.bash hook)"
conda deactivate
conda activate ${FCENV}
fi
if [ $? != 0 ]; then
echo "Failed to activate conda env: ${FCENV} ... creating"
if [[ ${HOST} =~ "Linux" ]]; then
echo "Linux"
conda env create -f environment-linux.yml
elif [[ ${HOST} =~ "Darwin" ]]; then
echo "OS X"
conda env create -f environment-osx.yml
else
echo "Unknown Host: ${HOST}"
exit 1
fi
conda activate ${FCENV}
if [ $? != 0 ]; then
echo "Failed to create conda environment and activate it."
exit 1
fi
fi
if [ -z "${CONDA_PREFIX}" ]; then
echo "Failed to find CONDA_PREFIX variable."
exit 1
fi
PREFIX="${CONDA_PREFIX}" ./conda/build.sh
+25
View File
@@ -9,8 +9,33 @@ include(CheckCSourceCompiles)
include(CheckIncludeFileCXX)
include(CheckCXXSourceCompiles)
#check_include_file(dlfcn.h HAVE_DLFCN_H)
check_include_file(GL/gl.h HAVE_GL_GL_H)
#check_include_file(iomanip.h HAVE_IOMANIP_H)
#check_include_file(limits.h HAVE_LIMITS_H)
#check_include_file(values.h HAVE_VALUES_H)
#check_include_file(float.h HAVE_FLOAT_H)
#check_include_file(inttypes.h HAVE_INTTYPES_H)
#check_include_file(libc.h HAVE_LIBC_H)
#check_include_file(memory.h HAVE_MEMORY_H)
#check_include_file(stdint.h HAVE_STDINT_H)
#check_include_file(stdlib.h HAVE_STDLIB_H)
#check_include_file(unistd.h HAVE_UNISTD_H)
#check_include_file(strings.h HAVE_STRINGS_H)
#check_include_file(string.h HAVE_STRING_H)
#check_include_file(bstring.h HAVE_BSTRING_H)
#check_include_file(siginfo.h HAVE_SIGINFO_H)
#check_include_file(bits/sigset.h HAVE_BITS_SIGSET_H)
#check_include_file(sys/dir.h HAVE_SYS_DIR_H)
#check_include_file(sys/filio.h HAVE_SYS_FILIO_H)
#check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
#check_include_file(sys/select.h HAVE_SYS_SELECT_H)
#check_include_file(sys/stat.h HAVE_SYS_STAT_H)
#check_include_file(sys/types.h HAVE_SYS_TYPES_H)
# i/o streams
check_include_file_cxx(istream HAVE_ISTREAM)
check_include_file_cxx(ostream HAVE_OSTREAM)
+125
View File
@@ -0,0 +1,125 @@
# Try to find Coin3D
# Once done this will define
#
# COIN3D_FOUND - system has Coin3D - Open Inventor
# COIN3D_INCLUDE_DIRS - where the Inventor include directory can be found
# COIN3D_LIBRARIES - Link this to use Coin3D
#
SET( COIN3D_FOUND "NO" )
IF (WIN32)
IF (CYGWIN OR MINGW)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
${CMAKE_INCLUDE_PATH}
/usr/include
/usr/local/include
/usr/include/coin
)
FIND_LIBRARY(COIN3D_LIBRARIES Coin
${CMAKE_LIBRARY_PATH}
/usr/lib
/usr/local/lib
)
ELSE (CYGWIN OR MINGW)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
)
FIND_LIBRARY(COIN3D_LIBRARY_DEBUG coin2d
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
)
FIND_LIBRARY(COIN3D_LIBRARY_RELEASE
NAMES
coin2
Coin4
PATHS
${CMAKE_LIBRARY_PATH}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
)
IF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
SET(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
ELSE (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
IF (COIN3D_LIBRARY_DEBUG)
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG})
ENDIF (COIN3D_LIBRARY_DEBUG)
IF (COIN3D_LIBRARY_RELEASE)
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE})
ENDIF (COIN3D_LIBRARY_RELEASE)
ENDIF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
IF (COIN3D_LIBRARIES)
# ADD_DEFINITIONS ( -DCOIN_NOT_DLL )
#ELSE (COIN3D_LIBRARIES)
# SET (COIN3D_LIBRARIES coin2d CACHE STRING "Coin3D Library (Debug) - Open Inventor API")
ENDIF (COIN3D_LIBRARIES)
ENDIF (CYGWIN OR MINGW)
ELSE (WIN32)
IF(APPLE)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
/Library/Frameworks/Inventor.framework/Headers
/usr/local/include
/usr/include
)
FIND_LIBRARY(COIN3D_LIBRARIES Coin
/Library/Frameworks/Inventor.framework/Libraries
/usr/lib
/usr/local/lib
)
SET(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
ELSE(APPLE)
# Try to use pkg-config first...
find_package(PkgConfig)
pkg_check_modules(COIN3D Coin)
# ... then fall back to manual lookup
IF(NOT COIN3D_FOUND)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
${CMAKE_INCLUDE_PATH}
/usr/include/Coin3
/usr/include
/usr/include/coin
/usr/local/include
)
FIND_LIBRARY(COIN3D_LIBRARIES Coin
${CMAKE_LIBRARY_PATH}
/usr/lib
/usr/local/lib
PATH_SUFFIXES Coin2 Coin3
)
ENDIF(NOT COIN3D_FOUND)
ENDIF(APPLE)
ENDIF (WIN32)
IF(COIN3D_LIBRARIES)
SET( COIN3D_FOUND "YES" )
message(STATUS "Coin3D libraries found")
IF(NOT COIN3D_VERSION)
file(READ "${COIN3D_INCLUDE_DIRS}/Inventor/C/basic.h" _coin3d_basic_h)
string(REGEX MATCH "define[ \t]+COIN_MAJOR_VERSION[ \t]+([0-9?])" _coin3d_major_version_match "${_coin3d_basic_h}")
set(COIN3D_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+COIN_MINOR_VERSION[ \t]+([0-9?])" _coin3d_minor_version_match "${_coin3d_basic_h}")
set(COIN3D_MINOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+COIN_MICRO_VERSION[ \t]+([0-9?])" _coin3d_micro_version_match "${_coin3d_basic_h}")
set(COIN3D_MICRO_VERSION "${CMAKE_MATCH_1}")
set(COIN3D_VERSION "${COIN3D_MAJOR_VERSION}.${COIN3D_MINOR_VERSION}.${COIN3D_MICRO_VERSION}")
ENDIF()
IF(NOT PIVY_VERSION)
execute_process (COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')" OUTPUT_VARIABLE PIVY_VERSION)
ENDIF()
ENDIF(COIN3D_LIBRARIES)
+21 -1
View File
@@ -54,8 +54,28 @@ IF (COIN3D_FOUND)
${CMAKE_BINARY_DIR}/src/Doc
)
IF( EXISTS ${COIN3D_DOC_TAGFILE})
SET( COIN3D_DOC_FOUND "YES" )
SET( COIN3D_DOC_FOUND "YES"
)
#ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
# find_program(WGET_PROG wget
# )
# IF( EXISTS ${WGET_PROG})
# execute_process(COMMAND ${WGET_PROG}
# -P ${CMAKE_BINARY_DIR}/src/Doc
# ${COIN3D_DOC_PATH}/coin.tag
# )
# find_file(COIN3D_DOC_TAGFILE coin.tag
# ${CMAKE_BINARY_DIR}/src/Doc
# )
# IF( EXISTS ${COIN3D_DOC_TAGFILE})
# SET( COIN3D_DOC_FOUND "YES"
# )
# ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
#
# ENDIF( EXISTS ${WGET_PROG})
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
ENDIF( EXISTS ${COIN3D_DOC_PATH})
ENDIF(APPLE)
ENDIF(WIN32)
+21 -5
View File
@@ -16,9 +16,16 @@
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
if(NOT Eigen3_FIND_VERSION)
set(Eigen3_FIND_VERSION_MAJOR 3)
set(Eigen3_FIND_VERSION_MINOR 0)
set(Eigen3_FIND_VERSION_PATCH 0)
if(NOT Eigen3_FIND_VERSION_MAJOR)
set(Eigen3_FIND_VERSION_MAJOR 2)
endif(NOT Eigen3_FIND_VERSION_MAJOR)
if(NOT Eigen3_FIND_VERSION_MINOR)
set(Eigen3_FIND_VERSION_MINOR 91)
endif(NOT Eigen3_FIND_VERSION_MINOR)
if(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION_PATCH 0)
endif(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
endif(NOT Eigen3_FIND_VERSION)
@@ -35,17 +42,23 @@ macro(_eigen3_check_version)
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK FALSE)
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
"but at least version ${Eigen3_FIND_VERSION} is required")
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK TRUE)
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
if(NOT EIGEN3_VERSION_OK)
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
"but at least version ${Eigen3_FIND_VERSION} is required")
endif(NOT EIGEN3_VERSION_OK)
endmacro(_eigen3_check_version)
if (EIGEN3_INCLUDE_DIR)
# in cache already
_eigen3_check_version()
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
else (EIGEN3_INCLUDE_DIR)
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
@@ -58,8 +71,11 @@ else (EIGEN3_INCLUDE_DIR)
if(EIGEN3_INCLUDE_DIR)
_eigen3_check_version()
endif(EIGEN3_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen3 REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK VERSION_VAR EIGEN3_VERSION)
mark_as_advanced(EIGEN3_INCLUDE_DIR)
endif(EIGEN3_INCLUDE_DIR)
+145 -119
View File
@@ -14,136 +14,162 @@
find_package(Netgen CONFIG)
IF (Netgen_FOUND)
set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIRS})
set(NGLIB_LIBRARIES nglib)
set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
# for external smesh only the following two variables are needed:
set(NETGEN_FOUND True)
set(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS})
if(Netgen_FOUND)
set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIRS})
set(NGLIB_LIBRARIES nglib)
set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
# for external smesh only the following two variables are needed:
set(NETGEN_FOUND True)
set(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS})
ELSE ()
else(Netgen_FOUND)
SET(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
IF (WIN32)
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR})
SET(NETGEN_LIBS nglib mesh occ interface)
SET(NGLIB_LIBRARIES "")
FOREACH (it ${NETGEN_LIBS})
FIND_LIBRARY(NGLIB ${it} PATHS ${NETGEN_LIBDIR})
FIND_LIBRARY(NGLIBD ${it}d PATHS ${NETGEN_LIBDIR})
IF (NGLIBD AND NGLIB)
SET(NG_LIB optimized ${NGLIB}
debug ${NGLIBD})
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NG_LIB})
UNSET(NGLIB CACHE)
UNSET(NGLIBD CACHE)
ELSEIF (NGLIB)
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB})
UNSET(NGLIB CACHE)
ENDIF ()
ENDFOREACH ()
SET(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
IF (NOT NETGENDATA)
SET(NETGENDATA netgen)
ENDIF (NOT NETGENDATA)
IF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
# We haven't supported Netgen prior to 5.3.1 on MacOS, and the current
# plan is for the next Netgen version to be 6.1 (currently unreleased).
IF(DEFINED HOMEBREW_PREFIX)
SET(NGLIB_PREFIX ${HOMEBREW_PREFIX})
ELSE(DEFINED HOMEBREW_PREFIX)
SET(NGLIB_PREFIX ${MACPORTS_PREFIX})
ENDIF(DEFINED HOMEBREW_PREFIX)
ELSEIF (DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
IF (NETGEN_ROOT)
SET(NETGEN_INCLUDEDIR ${NETGEN_ROOT}/include)
SET(NETGEN_LIBDIR ${NETGEN_ROOT}/lib)
# allow to customize if NETGEN_ROOT is used
IF (NOT NETGENDATA)
SET(NETGENDATA ${NETGEN_ROOT}/libsrc)
ENDIF ()
ENDIF ()
FIND_PATH(NGLIB_INCLUDE_DIR nglib.h ${NGLIB_PREFIX}/include)
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR} /usr/include /usr/include/netgen-mesher)
FIND_LIBRARY(NGLIB_LIBNGLIB nglib PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB})
FIND_LIBRARY(NGLIB_LIBMESH NAMES mesh ngmesh PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
IF (NGLIB_LIBMESH)
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBMESH})
ENDIF ()
FIND_LIBRARY(NGLIB_LIBOCC NAMES occ ngocc PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
IF (NGLIB_LIBOCC)
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBOCC})
ENDIF ()
FIND_LIBRARY(NGLIB_LIBINTERFACE NAMES interface nginterface PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
IF (NGLIB_LIBINTERFACE)
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBINTERFACE})
ENDIF ()
FIND_LIBRARY(NGLIB_LIBNGLIB nglib ${NGLIB_PREFIX}/lib)
FIND_LIBRARY(NGLIB_LIBMESH mesh ${NGLIB_PREFIX}/lib)
FIND_LIBRARY(NGLIB_LIBOCC occ ${NGLIB_PREFIX}/lib)
FIND_LIBRARY(NGLIB_LIBINTERFACE interface ${NGLIB_PREFIX}/lib)
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB} ${NGLIB_LIBMESH}
${NGLIB_LIBOCC} ${NGLIB_LIBINTERFACE})
IF (NOT NETGENDATA)
SET(NETGENDATA /usr/share/netgen/libsrc)
ENDIF ()
ENDIF ()
IF(NOT NETGENDATA)
SET(NETGENDATA ${NGLIB_PREFIX}/include/netgen)
ENDIF(NOT NETGENDATA)
FIND_PATH(NETGEN_DIR_include NAMES mydefs.hpp NO_DEFAULT_PATH PATHS ${NGLIB_INCLUDE_DIR}/include ${NETGENDATA}/include ${NETGEN_INCLUDEDIR} ${NGLIB_INCLUDE_DIR})
ELSEIF(WIN32)
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR})
SET(NETGEN_LIBS nglib mesh occ interface)
SET(NGLIB_LIBRARIES "")
FOREACH(it ${NETGEN_LIBS})
FIND_LIBRARY(NGLIB ${it} PATHS ${NETGEN_LIBDIR})
FIND_LIBRARY(NGLIBD ${it}d PATHS ${NETGEN_LIBDIR})
IF(NGLIBD AND NGLIB)
SET(NG_LIB optimized ${NGLIB}
debug ${NGLIBD})
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NG_LIB})
UNSET(NGLIB CACHE)
UNSET(NGLIBD CACHE)
ELSEIF(NGLIB)
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB})
UNSET(NGLIB CACHE)
ENDIF()
ENDFOREACH()
IF (NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include)
MESSAGE(STATUS "Cannot find NETGEN header files.")
ELSEIF (NOT NETGEN_VERSION)
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION REGEX "#define PACKAGE_VERSION.*")
ENDIF ()
IF(NOT NETGENDATA)
SET(NETGENDATA netgen)
ENDIF(NOT NETGENDATA)
IF (NOT NGLIB_LIBRARIES)
MESSAGE(STATUS "Cannot find NETGEN library.")
ENDIF ()
ELSE(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
IF(NETGEN_ROOT)
SET(NETGEN_INCLUDEDIR ${NETGEN_ROOT}/include)
SET(NETGEN_LIBDIR ${NETGEN_ROOT}/lib)
# allow to customize if NETGEN_ROOT is used
IF(NOT NETGENDATA)
SET(NETGENDATA ${NETGEN_ROOT}/libsrc)
ENDIF(NOT NETGENDATA)
ENDIF()
IF (NGLIB_INCLUDE_DIR AND NGLIB_LIBRARIES)
SET(Netgen_FOUND TRUE)
SET(NETGEN_INCLUDE_DIRS ${NETGEN_DIR_include} ${NGLIB_INCLUDE_DIR})
LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS)
ELSE ()
SET(Netgen_FOUND FALSE)
ENDIF ()
ENDIF ()
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR} /usr/include /usr/include/netgen-mesher)
FIND_LIBRARY(NGLIB_LIBNGLIB nglib PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB})
FIND_LIBRARY(NGLIB_LIBMESH NAMES mesh ngmesh PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
IF(NGLIB_LIBMESH)
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBMESH})
ENDIF()
FIND_LIBRARY(NGLIB_LIBOCC NAMES occ ngocc PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
IF(NGLIB_LIBOCC)
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBOCC})
ENDIF()
FIND_LIBRARY(NGLIB_LIBINTERFACE NAMES interface nginterface PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
IF(NGLIB_LIBINTERFACE)
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBINTERFACE})
ENDIF()
IF(NOT NETGENDATA)
SET(NETGENDATA /usr/share/netgen/libsrc)
ENDIF(NOT NETGENDATA)
ENDIF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
FIND_PATH(NETGEN_DIR_include NAMES mydefs.hpp NO_DEFAULT_PATH PATHS ${NGLIB_INCLUDE_DIR}/include ${NETGENDATA}/include ${NETGEN_INCLUDEDIR} ${NGLIB_INCLUDE_DIR})
IF(NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include)
MESSAGE(STATUS "Cannot find NETGEN header files.")
ELSEIF(NOT NETGEN_VERSION)
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION
REGEX "#define PACKAGE_VERSION.*"
)
ENDIF()
IF(NOT NGLIB_LIBRARIES)
MESSAGE(STATUS "Cannot find NETGEN library.")
ENDIF()
IF(NGLIB_INCLUDE_DIR AND NGLIB_LIBRARIES)
SET(Netgen_FOUND TRUE)
SET(NETGEN_INCLUDE_DIRS ${NETGEN_DIR_include} ${NGLIB_INCLUDE_DIR})
LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS)
ELSE()
SET(Netgen_FOUND FALSE)
ENDIF()
endif(Netgen_FOUND)
# Package-provided cMake file is not enough
IF (Netgen_FOUND)
IF (NOT NETGEN_VERSION_MAJOR)
IF (NETGEN_VERSION)
string(REGEX MATCHALL "[0-9]+" NETGEN_VERSION_expr ${NETGEN_VERSION})
list(LENGTH NETGEN_VERSION_expr NETGEN_VERSION_COUNT)
list(GET NETGEN_VERSION_expr 0 NETGEN_VERSION_MAJOR)
IF (NETGEN_VERSION_COUNT GREATER 1)
list(GET NETGEN_VERSION_expr 1 NETGEN_VERSION_MINOR)
ELSE ()
set(NETGEN_VERSION_MINOR 0)
ENDIF ()
ELSE () # workaround for netgen 6.2 and newer. currently there is no easy way to detect the version
# better use "find_package(netgen CONFIG REQUIRED)"
set(NETGEN_VERSION_MAJOR 6)
set(NETGEN_VERSION_MINOR 2)
ENDIF ()
set(NETGEN_VERSION_PATCH 0)
ENDIF ()
IF(Netgen_FOUND)
IF(NOT NETGEN_VERSION_MAJOR)
IF(NETGEN_VERSION)
string(REGEX MATCHALL "[0-9]+" NETGEN_VERSION_expr ${NETGEN_VERSION})
list(LENGTH NETGEN_VERSION_expr NETGEN_VERSION_COUNT)
list(GET NETGEN_VERSION_expr 0 NETGEN_VERSION_MAJOR)
IF(NETGEN_VERSION_COUNT GREATER 1)
list(GET NETGEN_VERSION_expr 1 NETGEN_VERSION_MINOR)
ELSE()
set(NETGEN_VERSION_MINOR 0)
ENDIF()
ELSE() # workaround for netgen 6.2 and newer. currently there is no easy way to detect the version
# better use "find_package(netgen CONFIG REQUIRED)"
set(NETGEN_VERSION_MAJOR 6)
set(NETGEN_VERSION_MINOR 2)
ENDIF()
set(NETGEN_VERSION_PATCH 0)
ENDIF()
MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8) + (${NETGEN_VERSION_PATCH})")
MATH(EXPR NETGEN_VERSION_62 "(6 << 16) + (2 << 8)")
MATH(EXPR NETGEN_VERSION_62_2004 "(6 << 16) + (2 << 8) + (2004)")
IF (NOT NETGEN_VERSION_C LESS NETGEN_VERSION_62) # Version >= 6.2
IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Clang sometimes fails to include <cstdio>
include(CMakePushCheckState)
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${NETGEN_CXX_FLAGS}")
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY1)
IF (NOT CSTDIO_INCLUDE_TRY1)
# Ugly hack to make <stdio.h> building gets function
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -U__cplusplus -D__cplusplus=201103L")
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY2)
IF (NOT CSTDIO_INCLUDE_TRY2)
message(FATAL_ERROR "Cannot #include <cstdio>.")
ELSE ()
set(NETGEN_CXX_FLAGS "${NETGEN_CXX_FLAGS} -U__cplusplus -D__cplusplus=201103L")
ENDIF ()
ENDIF ()
cmake_pop_check_state()
ENDIF ()
ENDIF ()
MESSAGE(STATUS "Found NETGEN version ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}, calculated: ${NETGEN_VERSION_C}")
LIST(APPEND NETGEN_DEFINITIONS -DNETGEN_VERSION=${NETGEN_VERSION_C})
ENDIF ()
MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8) + (${NETGEN_VERSION_PATCH})")
MATH(EXPR NETGEN_VERSION_62 "(6 << 16) + (2 << 8)")
MATH(EXPR NETGEN_VERSION_62_2004 "(6 << 16) + (2 << 8) + (2004)")
IF(NOT NETGEN_VERSION_C LESS NETGEN_VERSION_62) # Version >= 6.2
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Clang sometimes fails to include <cstdio>
include(CMakePushCheckState)
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${NETGEN_CXX_FLAGS}")
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY1)
IF(NOT CSTDIO_INCLUDE_TRY1)
# Ugly hack to make <stdio.h> building gets function
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -U__cplusplus -D__cplusplus=201103L")
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY2)
IF(NOT CSTDIO_INCLUDE_TRY2)
message(FATAL_ERROR "Cannot #include <cstdio>.")
ELSE()
set(NETGEN_CXX_FLAGS "${NETGEN_CXX_FLAGS} -U__cplusplus -D__cplusplus=201103L")
ENDIF()
ENDIF()
cmake_pop_check_state()
ENDIF()
ENDIF()
MESSAGE(STATUS "Found NETGEN version ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}, calculated: ${NETGEN_VERSION_C}")
LIST(APPEND NETGEN_DEFINITIONS -DNETGEN_VERSION=${NETGEN_VERSION_C})
ENDIF()
+12 -12
View File
@@ -127,6 +127,8 @@ if(OCC_FOUND)
TKG2d
TKG3d
TKMath
TKIGES
TKSTL
TKShHealing
TKXSBase
TKBool
@@ -137,12 +139,13 @@ if(OCC_FOUND)
TKGeomBase
TKOffset
TKPrim
TKSTEPBase
TKSTEPAttr
TKSTEP209
TKSTEP
TKHLR
TKFeat
)
if (OCC_VERSION_STRING VERSION_GREATER_EQUAL 7.9.0)
list(APPEND OCC_LIBRARIES TKExpress)
endif ()
set(OCC_OCAF_LIBRARIES
TKBin
TKBinL
@@ -151,20 +154,17 @@ if(OCC_FOUND)
TKLCAF
TKVCAF
TKCDF
TKXDESTEP
TKXDEIGES
TKMeshVS
TKService
TKV3d
)
if(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
if(OCC_VERSION_STRING VERSION_LESS 6.7.3)
list(APPEND OCC_OCAF_LIBRARIES TKAdvTools)
elseif(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
list(APPEND OCC_OCAF_LIBRARIES TKRWMesh)
endif(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
if(OCC_VERSION_STRING VERSION_LESS 7.8.0)
list(APPEND OCC_LIBRARIES TKIGES TKSTL TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP)
list(APPEND OCC_OCAF_LIBRARIES TKXDESTEP TKXDEIGES)
else(OCC_VERSION_STRING VERSION_LESS 7.8.0)
list(APPEND OCC_LIBRARIES TKDESTEP TKDEIGES TKDEGLTF TKDESTL)
endif(OCC_VERSION_STRING VERSION_LESS 7.8.0)
endif(OCC_VERSION_STRING VERSION_LESS 6.7.3)
message(STATUS "-- Found OCE/OpenCASCADE version: ${OCC_VERSION_STRING}")
message(STATUS "-- OCE/OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
message(STATUS "-- OCE/OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
+43 -43
View File
@@ -3,10 +3,10 @@
#
# The following variables are optionally searched for defaults
# OpenCV_ROOT_DIR: Base directory of OpenCv tree to use.
# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
# compatible interface. typically CV CXCORE CVAUX HIGHGUI CVCAM .. etc.
#
# The following are set after configuration is done:
# The following are set after configuration is done:
# OpenCV_FOUND
# OpenCV_INCLUDE_DIR
# OpenCV_LIBRARIES
@@ -16,10 +16,10 @@
# OPENCV_* uppercase replaced by case sensitive OpenCV_*
# OPENCV_EXE_LINKER_FLAGS
# OPENCV_INCLUDE_DIR : replaced by plural *_DIRS
#
# 2004/05 Jan Woetzel, Friso, Daniel Grest
#
# 2004/05 Jan Woetzel, Friso, Daniel Grest
# 2006/01 complete rewrite by Jan Woetzel
# 1006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES
# 1006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES
# to handle multiple installed versions gracefully by Jan Woetzel
#
# tested with:
@@ -42,14 +42,14 @@ IF (NOT OpenCV_FIND_COMPONENTS)
SET(OpenCV_FIND_REQUIRED_COMPONENTS CV CXCORE CVAUX HIGHGUI )
IF (WIN32)
LIST(APPEND OpenCV_FIND_REQUIRED_COMPONENTS CVCAM ) # WIN32 only actually
ENDIF(WIN32)
ENDIF(WIN32)
ENDIF (NOT OpenCV_FIND_COMPONENTS)
# typical root dirs of installations, exactly one of them is used
SET (OpenCV_POSSIBLE_ROOT_DIRS
"${OpenCV_ROOT_DIR}"
"$ENV{OpenCV_ROOT_DIR}"
"$ENV{OpenCV_ROOT_DIR}"
"$ENV{OPENCV_DIR}" # only for backward compatibility deprecated by ROOT_DIR
"$ENV{OPENCV_HOME}" # only for backward compatibility
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Intel(R) Open Source Computer Vision Library_is1;Inno Setup: App Path]"
@@ -59,17 +59,17 @@ SET (OpenCV_POSSIBLE_ROOT_DIRS
)
# MIP Uni Kiel /opt/net network installation
# MIP Uni Kiel /opt/net network installation
# get correct prefix for current gcc compiler version for gcc 3.x 4.x
IF (${CMAKE_COMPILER_IS_GNUCXX})
IF (NOT OpenCV_FIND_QUIETLY)
MESSAGE(STATUS "Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path")
ENDIF (NOT OpenCV_FIND_QUIETLY)
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE CXX_COMPILER_VERSION)
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE CXX_COMPILER_VERSION)
IF (CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
SET(IS_GNUCXX3 TRUE)
LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc33/OpenCV )
ENDIF(CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
ENDIF(CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
IF (CXX_COMPILER_VERSION MATCHES ".*4\\.[0-9].*")
SET(IS_GNUCXX4 TRUE)
LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc41/OpenCV )
@@ -79,15 +79,15 @@ ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
#DBG_MSG("DBG (OpenCV_POSSIBLE_ROOT_DIRS=${OpenCV_POSSIBLE_ROOT_DIRS}")
#
# select exactly ONE OpenCV base directory/tree
# select exactly ONE OpenCV base directory/tree
# to avoid mixing different version headers and libs
#
FIND_PATH(OpenCV_ROOT_DIR
NAMES
FIND_PATH(OpenCV_ROOT_DIR
NAMES
cv/include/cv.h # windows
include/opencv/cv.h # linux /opt/net
include/cv/cv.h
include/cv.h
include/cv/cv.h
include/cv.h
PATHS ${OpenCV_POSSIBLE_ROOT_DIRS})
DBG_MSG("OpenCV_ROOT_DIR=${OpenCV_ROOT_DIR}")
@@ -106,7 +106,7 @@ SET(OpenCV_INCDIR_SUFFIXES
otherlibs/_graphics/include
)
# library linkdir suffixes appended to OpenCV_ROOT_DIR
# library linkdir suffixes appended to OpenCV_ROOT_DIR
SET(OpenCV_LIBDIR_SUFFIXES
lib
OpenCV/lib
@@ -119,56 +119,56 @@ SET(OpenCV_LIBDIR_SUFFIXES
# find incdir for each lib
#
FIND_PATH(OpenCV_CV_INCLUDE_DIR
NAMES cv.h
PATHS ${OpenCV_ROOT_DIR}
NAMES cv.h
PATHS ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
FIND_PATH(OpenCV_CXCORE_INCLUDE_DIR
FIND_PATH(OpenCV_CXCORE_INCLUDE_DIR
NAMES cxcore.h
PATHS ${OpenCV_ROOT_DIR}
PATHS ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
FIND_PATH(OpenCV_CVAUX_INCLUDE_DIR
FIND_PATH(OpenCV_CVAUX_INCLUDE_DIR
NAMES cvaux.h
PATHS ${OpenCV_ROOT_DIR}
PATHS ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR
NAMES highgui.h
PATHS ${OpenCV_ROOT_DIR}
FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR
NAMES highgui.h
PATHS ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
FIND_PATH(OpenCV_CVCAM_INCLUDE_DIR
NAMES cvcam.h
PATHS ${OpenCV_ROOT_DIR}
FIND_PATH(OpenCV_CVCAM_INCLUDE_DIR
NAMES cvcam.h
PATHS ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
#
# find sbsolute path to all libraries
# find sbsolute path to all libraries
# some are optionally, some may not exist on Linux
#
FIND_LIBRARY(OpenCV_CV_LIBRARY
FIND_LIBRARY(OpenCV_CV_LIBRARY
NAMES cv opencv
PATHS ${OpenCV_ROOT_DIR}
PATHS ${OpenCV_ROOT_DIR}
PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CVAUX_LIBRARY
NAMES cvaux
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CVCAM_LIBRARY
FIND_LIBRARY(OpenCV_CVCAM_LIBRARY
NAMES cvcam
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CVHAARTRAINING_LIBRARY
NAMES cvhaartraining
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CXCORE_LIBRARY
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CXCORE_LIBRARY
NAMES cxcore
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_CXTS_LIBRARY
FIND_LIBRARY(OpenCV_CXTS_LIBRARY
NAMES cxts
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_HIGHGUI_LIBRARY
FIND_LIBRARY(OpenCV_HIGHGUI_LIBRARY
NAMES highgui
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_ML_LIBRARY
FIND_LIBRARY(OpenCV_ML_LIBRARY
NAMES ml
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
FIND_LIBRARY(OpenCV_TRS_LIBRARY
FIND_LIBRARY(OpenCV_TRS_LIBRARY
NAMES trs
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
@@ -181,7 +181,7 @@ SET(OpenCV_FOUND ON)
DBG_MSG("OpenCV_FIND_REQUIRED_COMPONENTS=${OpenCV_FIND_REQUIRED_COMPONENTS}")
FOREACH(NAME ${OpenCV_FIND_REQUIRED_COMPONENTS} )
# only good if header and library both found
# only good if header and library both found
IF (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY)
LIST(APPEND OpenCV_INCLUDE_DIRS ${OpenCV_${NAME}_INCLUDE_DIR} )
LIST(APPEND OpenCV_LIBRARIES ${OpenCV_${NAME}_LIBRARY} )
@@ -192,13 +192,13 @@ FOREACH(NAME ${OpenCV_FIND_REQUIRED_COMPONENTS} )
"\nOpenCV_${NAME}_LIBRARY=${OpenCV_${NAME}_LIBRARY} ")
SET(OpenCV_FOUND OFF)
ENDIF (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY)
ENDFOREACH(NAME)
DBG_MSG("OpenCV_INCLUDE_DIRS=${OpenCV_INCLUDE_DIRS}")
DBG_MSG("OpenCV_LIBRARIES=${OpenCV_LIBRARIES}")
# get the link directory for rpath to be used with LINK_DIRECTORIES:
# get the link directory for rpath to be used with LINK_DIRECTORIES:
IF (OpenCV_CV_LIBRARY)
GET_FILENAME_COMPONENT(OpenCV_LINK_DIRECTORIES ${OpenCV_CV_LIBRARY} PATH)
ENDIF (OpenCV_CV_LIBRARY)
@@ -239,7 +239,7 @@ IF(NOT OpenCV_FOUND)
MESSAGE(FATAL_ERROR
"OpenCV required but some headers or libs not found. Please specify it's location with OpenCV_ROOT_DIR env. variable.")
ELSE(OpenCV_FIND_REQUIRED)
MESSAGE(STATUS
MESSAGE(STATUS
"ERROR: OpenCV was not found.")
ENDIF(OpenCV_FIND_REQUIRED)
ENDIF(NOT OpenCV_FIND_QUIETLY)
+6 -6
View File
@@ -53,7 +53,7 @@ else(PYCXX_INCLUDE_DIR)
endif(PyCXX_FIND_REQUIRED)
endif(NOT PYCXX_INCLUDE_DIR)
endif(PYCXX_INCLUDE_DIR)
# find the sources directory
if(PYCXX_SOURCE_DIR)
# source directory specified, they'd better be there
@@ -117,11 +117,11 @@ if(PYCXX_FOUND)
${PYCXX_SOURCE_DIR}/cxxsupport.cxx
${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
)
#set old 6.2 pycxx compatibility
list(APPEND PYCXX_SOURCES ${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx)
add_definitions(-DPYCXX_6_2_COMPATIBILITY)
#end old compatibility
if(NOT ${PYCXX_VERSION} VERSION_LESS 7.0.0)
list(APPEND PYCXX_SOURCES
${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx)
add_definitions(-DPYCXX_6_2_COMPATIBILITY)
endif()
else(PYCXX_FOUND)
MESSAGE(STATUS "PyCXX not found")
endif(PYCXX_FOUND)
+83 -16
View File
@@ -1,7 +1,18 @@
# Try to find PySide2 utilities, PYSIDE2UIC and PYSIDE2RCC:
# PYSIDE_UIC_EXECUTABLE - Location of PYSIDE2UIC executable
# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE2RCC executable
# PYSIDE_TOOLS_FOUND - PySide2 utilities found.
# PYSIDE2UICBINARY - Location of PYSIDE2UIC executable
# PYSIDE2RCCBINARY - Location of PYSIDE2RCC executable
# PYSIDE2_TOOLS_FOUND - PySide2 utilities found.
# Also provides macro similar to FindQt4.cmake's WRAP_UI and WRAP_RC,
# for the automatic generation of Python code from Qt4's user interface
# ('.ui') and resource ('.qrc') files. These macros are called:
# - PYSIDE_WRAP_UI
# - PYSIDE_WRAP_RC
IF(PYSIDE2UICBINARY AND PYSIDE2RCCBINARY)
# Already in cache, be silent
set(PYSIDE2_TOOLS_FOUND_QUIETLY TRUE)
ENDIF(PYSIDE2UICBINARY AND PYSIDE2RCCBINARY)
if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
#pyside2 tools are often in same location as python interpreter
@@ -16,32 +27,88 @@ FIND_PACKAGE(Qt5 COMPONENTS Core Widgets)
IF(Qt5Core_VERSION VERSION_LESS 5.14)
# Legacy (< 5.14)
FIND_PROGRAM(PYSIDE2_UIC_EXECUTABLE NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
FIND_PROGRAM(PYSIDE2_RCC_EXECUTABLE NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
set(UICOPTIONS "")
set(RCCOPTIONS "")
ELSE()
# New (>= 5.14)
if (TARGET Qt::uic)
get_property(PYSIDE2_UIC_EXECUTABLE TARGET Qt::uic PROPERTY LOCATION)
get_property(PYSIDE2UICBINARY TARGET Qt::uic PROPERTY LOCATION)
set(UICOPTIONS "--generator=python")
endif()
if (TARGET Qt::rcc)
get_property(PYSIDE2_RCC_EXECUTABLE TARGET Qt::rcc PROPERTY LOCATION)
get_property(PYSIDE2RCCBINARY TARGET Qt::rcc PROPERTY LOCATION)
set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
endif()
ENDIF()
ENDIF(Qt5Core_VERSION VERSION_LESS 5.14)
set(PYSIDE_RCC_EXECUTABLE ${PYSIDE2_RCC_EXECUTABLE})
set(PYSIDE_UIC_EXECUTABLE ${PYSIDE2_UIC_EXECUTABLE})
set(PySideTools_VERSION 2)
MACRO(PYSIDE_WRAP_UI outfiles)
if (NOT PYSIDE2UICBINARY)
message(FATAL_ERROR "Qt uic is required for generating ${ARGN}")
endif()
FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
#ADD_CUSTOM_TARGET(${it} ALL
# DEPENDS ${outfile}
#)
if(WIN32 OR APPLE)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else()
# Especially on Open Build Service we don't want changing date like
# pyside2-uic generates in comments at beginning., which is why
# we follow the tool command with a POSIX-friendly sed.
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif()
list(APPEND ${outfiles} ${outfile})
ENDFOREACH(it)
ENDMACRO (PYSIDE_WRAP_UI)
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
set(PYSIDE_TOOLS_FOUND TRUE)
MACRO(PYSIDE_WRAP_RC outfiles)
if (NOT PYSIDE2RCCBINARY)
message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}")
endif()
FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}_rc.py")
#ADD_CUSTOM_TARGET(${it} ALL
# DEPENDS ${outfile}
#)
if(WIN32 OR APPLE)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else()
# Especially on Open Build Service we don't want changing date like
# pyside-rcc generates in comments at beginning, which is why
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif()
list(APPEND ${outfiles} ${outfile})
ENDFOREACH(it)
ENDMACRO (PYSIDE_WRAP_RC)
if(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
set(PYSIDE2_TOOLS_FOUND TRUE)
if (NOT PySide2Tools_FIND_QUIETLY)
message(STATUS "Found PySide2 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}")
message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}")
endif (NOT PySide2Tools_FIND_QUIETLY)
else()
else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
if(PySide2Tools_FIND_REQUIRED)
message(FATAL_ERROR "PySide2 tools could not be found, but are required.")
else(PySide2Tools_FIND_REQUIRED)
@@ -49,4 +116,4 @@ else()
message(STATUS "PySide2 tools: not found.")
endif (NOT PySide2Tools_FIND_QUIETLY)
endif(PySide2Tools_FIND_REQUIRED)
endif()
endif(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
-22
View File
@@ -1,22 +0,0 @@
# The Qt for Python project officially recommends using pip to install PySide, so we expect to find PySide in the
# site-packages directory. The library will be called "PySide6.abi3.*", and there will be an "include" directory inside
# the site-packages/PySide6. Over time some distros may provide custom versions, so we also support using a more normal
# cMake find_package() call
find_package(PySide6 CONFIG QUIET)
if(NOT PySide6_FOUND)
if(NOT PySide6_INCLUDE_DIR AND TARGET PySide6::pyside6)
get_property(PySide6_INCLUDE_DIR TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
endif()
if(NOT PySide6_INCLUDE_DIR)
find_pip_package(PySide6)
if (PySide6_FOUND)
set(PYSIDE_INCLUDE_DIR ${PySide6_INCLUDE_DIRS} CACHE INTERNAL "")
set(PYSIDE_LIBRARY ${PySide6_LIBRARIES} CACHE INTERNAL "")
set(PYSIDE_FOUND TRUE CACHE BOOL OFF)
set(PYSIDE_MAJOR_VERSION 6 CACHE INTERNAL 6)
endif()
endif()
endif()
-32
View File
@@ -1,32 +0,0 @@
# Try to find PYSIDE6 utilities, PYSIDE6UIC and PYSIDE6RCC:
# PYSIDE_UIC_EXECUTABLE - Location of PYSIDE6UIC executable
# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE6RCC executable
# PYSIDE_TOOLS_FOUND - PYSIDE6 utilities found.
if (TARGET Qt6::uic)
get_target_property(PYSIDE6_UIC_EXECUTABLE Qt6::uic LOCATION)
set(UICOPTIONS "--generator=python")
endif()
if (TARGET Qt6::rcc)
get_target_property(PYSIDE6_RCC_EXECUTABLE Qt6::rcc LOCATION)
set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
endif()
set(PYSIDE_RCC_EXECUTABLE ${PYSIDE6_RCC_EXECUTABLE})
set(PYSIDE_UIC_EXECUTABLE ${PYSIDE6_UIC_EXECUTABLE})
set(PySideTools_VERSION 6)
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
set(PYSIDE_TOOLS_FOUND TRUE)
if (NOT PYSIDE6Tools_FIND_QUIETLY)
message(STATUS "Found PYSIDE6 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}")
endif ()
else()
if(PYSIDE6Tools_FIND_REQUIRED)
message(FATAL_ERROR "PYSIDE6 tools could not be found, but are required.")
else()
if (NOT PYSIDE6Tools_FIND_QUIETLY)
message(STATUS "PYSIDE6 tools: not found.")
endif ()
endif()
endif()
+3 -3
View File
@@ -6,7 +6,7 @@
# OCULUS_LIBRARIES
#
# Copyright (c) 2012 I-maginer
#
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
@@ -42,11 +42,11 @@ IF(OCULUS_ROOT)
${OCULUS_INCLUDE_SEARCH_DIRS}
${OCULUS_ROOT}/include
)
SET(OCULUS_LIBRARY_SEARCH_RELEASE_DIRS
SET(OCULUS_LIBRARY_SEARCH_RELEASE_DIRS
${OCULUS_LIBRARY_SEARCH_DIRS}
${OCULUS_ROOT}/Lib/x64/VS2012
)
SET(OCULUS_LIBRARY_SEARCH_DEBUG_DIRS
SET(OCULUS_LIBRARY_SEARCH_DEBUG_DIRS
${OCULUS_LIBRARY_SEARCH_DIRS}
${OCULUS_ROOT}/Lib/x64/VS2012
)
+8 -38
View File
@@ -5,50 +5,23 @@
# SMESH_INCLUDE_DIR - where the Salome SMESH include directory can be found
# SMESH_LIBRARIES - Link this to use Salome SMESH
#
# SMESH needs VTK
find_package(VTK REQUIRED)
# If this definition is not set, linker errors will occur against SMESH on 64 bit machines.
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DSALOME_USE_64BIT_IDS)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
IF (CMAKE_COMPILER_IS_GNUCC)
FIND_PATH(SMESH_INCLUDE_DIR SMESH_Mesh.hxx
# These are default search paths, why specify them?
PATH_SUFFIXES smesh SMESH smesh/SMESH
# /usr/include
# /usr/local/include
PATH_SUFFIXES smesh
)
FIND_LIBRARY(SMESH_LIBRARY SMESH
# /usr/lib
# /usr/local/lib
)
FIND_LIBRARY(SMESH_LIBRARY SMESH)
ELSE (CMAKE_COMPILER_IS_GNUCC)
# Not yet implemented
ENDIF (CMAKE_COMPILER_IS_GNUCC)
IF(SMESH_INCLUDE_DIR)
SET(SMESH_INC_ROOT "${SMESH_INCLUDE_DIR}/..")
# Append extra include dirs
SET(SMESH_INCLUDE_DIR
"${SMESH_INCLUDE_DIR};
${SMESH_INC_ROOT}/Controls;
${SMESH_INC_ROOT}/Driver;
${SMESH_INC_ROOT}/DriverDAT;
${SMESH_INC_ROOT}/DriverGMF;
${SMESH_INC_ROOT}/DriverSTL;
${SMESH_INC_ROOT}/DriverUNV;
${SMESH_INC_ROOT}/Geom;
${SMESH_INC_ROOT}/Kernel;
${SMESH_INC_ROOT}/MEFISTO2;
${SMESH_INC_ROOT}/MeshVSLink;
${SMESH_INC_ROOT}/Netgen;
${SMESH_INC_ROOT}/NETGENPlugin;
${SMESH_INC_ROOT}/SMDS;
${SMESH_INC_ROOT}/SMESHDS;
${SMESH_INC_ROOT}/SMESHUtils;
${SMESH_INC_ROOT}/StdMeshers;")
ELSE(SMESH_INCLUDE_DIR)
message(FATAL_ERROR "SMESH include directories not found!")
ENDIF(SMESH_INCLUDE_DIR)
SET(SMESH_FOUND FALSE)
IF(SMESH_LIBRARY)
SET(SMESH_FOUND TRUE)
@@ -63,8 +36,5 @@ IF(SMESH_LIBRARY)
${SMESH_LIBRARY_DIR}/libSMESHDS.so
${SMESH_LIBRARY_DIR}/libStdMeshers.so
)
set(EXTERNAL_SMESH_LIBS ${SMESH_LIBRARIES})
ELSE(SMESH_LIBRARY)
message(FATAL_ERROR "SMESH libraries NOT FOUND!")
ENDIF(SMESH_LIBRARY)
-28
View File
@@ -1,28 +0,0 @@
# The Qt for Python project officially recommends using pip to install Shiboken, so we expect to find Shiboken in the
# site-packages directory. FreeCAD also requires shiboken6_generator, so this find script also locates that package
# and ensures the inclusion of its include directory when using the pip finding mechanism
find_package(Shiboken6 CONFIG QUIET)
if(NOT Shiboken6_FOUND)
if(NOT Shiboken6_INCLUDE_DIR AND TARGET Shiboken6::Shiboken6)
get_property(Shiboken6_INCLUDE_DIR TARGET Shiboken6::Shiboken6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
endif()
if(NOT Shiboken6_INCLUDE_DIR)
find_pip_package(Shiboken6)
if (Shiboken6_FOUND)
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "")
set(SHIBOKEN_MAJOR_VERSION 6 CACHE INTERNAL 6)
set(SHIBOKEN_FOUND ON CACHE BOOL OFF)
endif()
# The include directory we actually want is part of shiboken6-generator
find_pip_package(shiboken6_generator)
if (shiboken6_generator_FOUND)
set(SHIBOKEN_INCLUDE_DIR ${shiboken6_generator_INCLUDE_DIRS} CACHE PATH "")
endif()
endif()
else()
set(SHIBOKEN_INCLUDE_DIR ${Shiboken6_INCLUDE_DIRS} CACHE PATH "")
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "")
set(SHIBOKEN_FOUND ON CACHE BOOL OFF)
endif()
@@ -17,7 +17,7 @@ macro(CheckInterModuleDependencies)
endif(${dependent})
endfunction(REQUIRES_MODS)
REQUIRES_MODS(BUILD_BIM BUILD_PART BUILD_MESH BUILD_DRAFT)
REQUIRES_MODS(BUILD_ARCH BUILD_PART BUILD_MESH BUILD_DRAFT)
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER)
REQUIRES_MODS(BUILD_DRAWING BUILD_PART BUILD_SPREADSHEET)
REQUIRES_MODS(BUILD_FEM BUILD_PART)
@@ -28,14 +28,14 @@ macro(CheckInterModuleDependencies)
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH BUILD_SMESH)
REQUIRES_MODS(BUILD_FLAT_MESH BUILD_MESH_PART)
REQUIRES_MODS(BUILD_OPENSCAD BUILD_MESH_PART BUILD_DRAFT)
REQUIRES_MODS(BUILD_PART BUILD_MATERIAL)
REQUIRES_MODS(BUILD_PART_DESIGN BUILD_SKETCHER)
# REQUIRES_MODS(BUILD_CAM BUILD_PART BUILD_MESH BUILD_ROBOT)
REQUIRES_MODS(BUILD_CAM BUILD_PART BUILD_MESH)
REQUIRES_MODS(BUILD_REVERSEENGINEERING BUILD_PART BUILD_MESH BUILD_POINTS)
REQUIRES_MODS(BUILD_PATH BUILD_PART BUILD_MESH BUILD_ROBOT)
REQUIRES_MODS(BUILD_RAYTRACING BUILD_PART)
REQUIRES_MODS(BUILD_REVERSEENGINEERING BUILD_PART BUILD_MESH)
REQUIRES_MODS(BUILD_ROBOT BUILD_PART)
REQUIRES_MODS(BUILD_SANDBOX BUILD_PART BUILD_MESH)
REQUIRES_MODS(BUILD_SKETCHER BUILD_PART)
REQUIRES_MODS(BUILD_SPREADSHEET BUILD_DRAFT)
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET)
REQUIRES_MODS(BUILD_START BUILD_WEB)
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET BUILD_DRAWING)
endmacro(CheckInterModuleDependencies)
-101
View File
@@ -1,101 +0,0 @@
# ADAPTED FOR FREECAD FROM VTK'S vtkQt.cmake
# ORIGINAL VTK COPYRIGHT NOTICE FOLLOWS (BSD 3-CLAUSE)
#
# /*=========================================================================
#
# Program: Visualization Toolkit
# Module: Copyright.txt
#
# Copyright (c) 1993-2015 Ken Martin, Will Schroeder, Bill Lorensen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
# of any contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# =========================================================================*/
# FREECAD_QT_VERSION is used to choose between Qt5 and Qt6.
# If it is set to Auto(default), FreeCAD finds and uses the
# version installed on the system. If both versions are
# found, Qt5 is preferred.
# The output variable is FREECAD_QT_MAJOR_VERSION, which will be either 5 or 6
macro(ChooseQtVersion)
set(freecad_supported_qt_versions "Auto" 5 6)
# The following `if` check can be removed once CMake 3.21 is required and
# the policy CMP0126 is set to NEW.
if (NOT DEFINED FREECAD_QT_VERSION)
set(FREECAD_QT_VERSION "Auto" CACHE
STRING "Expected Qt major version. Valid values are Auto, 5, 6.")
set_property(CACHE FREECAD_QT_VERSION PROPERTY STRINGS "${freecad_supported_qt_versions}")
endif()
if(FREECAD_LIBPACK_USE)
find_file(FREECAD_LIBPACK_CHECKFILE_VERSION NAMES FREECAD_LIBPACK_VERSION PATHS ${FREECAD_LIBPACK_DIR} NO_DEFAULT_PATH)
if(FREECAD_LIBPACK_CHECKFILE_VERSION)
file(READ ${FREECAD_LIBPACK_CHECKFILE_VERSION} FREECAD_LIBPACK_VERSION)
message(STATUS "LibPack: read version file and got ${FREECAD_LIBPACK_VERSION}")
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
message(STATUS "Using Qt6 directory from LibPack in ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt6")
set(Qt6_DIR ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt6)
set(FREECAD_QT_VERSION 6)
else()
message(ERROR ": Unrecognized LibPack version ${FREECAD_LIBPACK_CHECKFILE_VERSION}")
endif()
else()
if (NOT Qt5_DIR OR Qt5_DIR STREQUAL "Qt5_DIR-NOTFOUND")
message(STATUS "Using Qt5 directory from LibPack in ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt5")
set(Qt5_DIR ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt5)
endif()
endif()
endif()
if (NOT FREECAD_QT_VERSION STREQUAL "Auto")
if (NOT FREECAD_QT_VERSION IN_LIST freecad_supported_qt_versions)
message(FATAL_ERROR
"Supported Qt versions are \"${freecad_supported_qt_versions}\". But "
"FREECAD_QT_VERSION is set to ${FREECAD_QT_VERSION}.")
endif ()
set(_FREECAD_QT_VERSION "${FREECAD_QT_VERSION}")
else ()
find_package(Qt5 QUIET COMPONENTS Core)
set(_FREECAD_QT_VERSION 5)
if (NOT Qt5_FOUND)
find_package(Qt6 QUIET COMPONENTS Core)
if (NOT Qt6_FOUND)
message(FATAL_ERROR
"Could not find a valid Qt installation. Consider setting Qt5_DIR or Qt6_DIR (as needed).")
endif ()
set(_FREECAD_QT_VERSION 6)
endif ()
endif ()
set(FREECAD_QT_MAJOR_VERSION "${_FREECAD_QT_VERSION}" CACHE INTERNAL
"Major version number for the Qt installation used.")
message(STATUS "Compiling with Qt ${FREECAD_QT_MAJOR_VERSION}")
endmacro()
@@ -17,9 +17,9 @@ macro(CompilerChecksAndSetups)
add_definitions(-DHAVE_SNPRINTF)
endif()
# Allow developers to use Boost < 1.65
# Allow developers to use Boost < 1.55
if (NOT BOOST_MIN_VERSION)
set(BOOST_MIN_VERSION 1.65)
set(BOOST_MIN_VERSION 1.55)
endif()
# For older cmake versions the variable 'CMAKE_CXX_COMPILER_VERSION' is missing
@@ -42,12 +42,14 @@ macro(CompilerChecksAndSetups)
endif()
# Escape the two plus chars as otherwise cmake complains about invalid regex
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+23")
set(CMAKE_CXX_STANDARD 23)
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
set(CMAKE_CXX_STANDARD 20)
else()#Enabled C++17
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+17")
set(CMAKE_CXX_STANDARD 17)
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+14")
set(CMAKE_CXX_STANDARD 14)
elseif (${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+11")
set(CMAKE_CXX_STANDARD 11)
endif()
# Log the compiler and version
@@ -55,7 +57,7 @@ macro(CompilerChecksAndSetups)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
include(${CMAKE_SOURCE_DIR}/cMake/ConfigureChecks.cmake)
configure_file(${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
add_definitions(-DHAVE_CONFIG_H)
# For now only set pedantic option for clang
@@ -75,11 +77,7 @@ macro(CompilerChecksAndSetups)
endif()
else(BUILD_DYNAMIC_LINK_PYTHON)
if(CMAKE_COMPILER_IS_CLANGXX)
if(APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
elseif(UNIX)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--undefined,dynamic_lookup")
endif()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
endif()
endif(BUILD_DYNAMIC_LINK_PYTHON)
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
@@ -95,14 +93,13 @@ macro(CompilerChecksAndSetups)
endif()
add_definitions(-DGL_SILENCE_DEPRECATION)
elseif (UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
endif()
endif()
# older boost.preprocessor turn off variadics for clang
add_definitions(-DBOOST_PP_VARIADICS=1)
message(STATUS "Force BOOST_PP_VARIADICS=1 for clang")
endif()
set (COMPILE_DEFINITIONS ${COMPILE_DEFINITIONS} BOOST_NO_CXX98_FUNCTION_BASE)
endmacro(CompilerChecksAndSetups)
@@ -2,7 +2,7 @@ macro(ConfigureCMakeVariables)
# ================================================================================
# Output directories for install target
if(MSVC)
if(WIN32)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "Installation root directory")
set(CMAKE_INSTALL_BINDIR bin CACHE PATH "Output directory for executables")
set(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
@@ -1,80 +0,0 @@
macro(CopyLibpackDirectories)
# Copy libpack dependency directories to build folder for user as part of overall build process
if(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
message(STATUS "Copying libpack dependency directories to build directory...")
file(COPY ${FREECAD_LIBPACK_DIR}/bin/assistant.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/bin/qt.conf DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
if(NOT FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_BINARY_DIR}/bin)
endif()
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/tls DESTINATION ${CMAKE_BINARY_DIR}/bin)
endif()
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0" AND FREECAD_LIBPACK_VERSION VERSION_LESS "3.1.0")
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
endif()
message(STATUS "... end copying.\n=======================================\n")
endif()
if(COPY_LIBPACK_BIN_TO_BUILD)
if(FREECAD_COPY_LIBPACK_BIN_TO_BUILD)
message("Copying LibPack 'bin' directory to build 'bin' directory...")
file(COPY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_BINARY_DIR})
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
message("Copying DLLs from LibPack 'lib' directory to build 'bin' directory...")
file(GLOB DLLS ${FREECAD_LIBPACK_DIR}/lib/*.dll)
file(COPY ${DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(GLOB DLLS ${FREECAD_LIBPACK_DIR}/bin/Lib/site-packages/shiboken6/shiboken*.dll)
file(COPY ${DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(GLOB DLLS ${FREECAD_LIBPACK_DIR}/bin/Lib/site-packages/PySide6/pyside6*.dll)
file(COPY ${DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin)
endif()
message(STATUS " ... done.")
endif()
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
message(STATUS "=======================================\n"
"Copying plugins to build directory.")
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
if(FREECAD_LIBPACK_VERSION VERSION_LESS "3.1.0")
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
endif()
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
endif()
endif()
if(FREECAD_INSTALL_DEPEND_DIRS)
# Test install command for installing/copying directories
message(STATUS "=======================================")
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
if(NOT FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
endif()
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/tls DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
endif()
if(FREECAD_LIBPACK_VERSION VERSION_LESS "3.1.0")
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_INSTALL_PREFIX})
endif()
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/lib DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.dll")
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
# Trailing slashes make sure that cMake extracts the files from the directory, rather than taking the
# directory with it
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin FILES_MATCHING PATTERN "*.dll")
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/bin/Lib/site-packages/shiboken6/ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin FILES_MATCHING PATTERN "shiboken*.dll")
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/bin/Lib/site-packages/PySide6/ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin FILES_MATCHING PATTERN "pyside6*.dll")
endif()
message(STATUS "Created install commands for INSTALL target.\n")
endif()
endmacro()
@@ -4,46 +4,38 @@ macro(FreeCADLibpackChecks)
if(FREECAD_LIBPACK_USE)
# checking for a unique file in LibPack location to make sure the right version of the LibPack is there
find_file(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db PATHS ${FREECAD_LIBPACK_DIR} NO_DEFAULT_PATH NO_CACHE)
find_file(FREECAD_LIBPACK_CHECKFILE_VERSION FREECAD_LIBPACK_VERSION PATHS ${FREECAD_LIBPACK_DIR} NO_DEFAULT_PATH NO_CACHE)
find_file(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db ${FREECAD_LIBPACK_DIR})
# don't show them in the GUI
set(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER "${FREECAD_LIBPACK_CHECKFILE_CLBUNDLER}" CACHE INTERNAL "Find libpack")
set(FREECAD_LIBPACK_CHECKFILE_VERSION "${FREECAD_LIBPACK_CHECKFILE_VERSION}" CACHE INTERNAL "Find libpack v3+")
if (FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
set(FREECAD_LIBPACK_VERSION "CLbundler" CACHE STRING "Displays if the libpack has been found" FORCE)
message("Found LibPack v2 (CLBundler) via ${FREECAD_LIBPACK_CHECKFILE_CLBUNDLER}")
include(cMake/UseLibPackCLbundler.cmake)
elseif (FREECAD_LIBPACK_CHECKFILE_VERSION)
file(READ ${FREECAD_LIBPACK_CHECKFILE_VERSION} FREECAD_LIBPACK_VERSION)
set(FREECAD_LIBPACK_VERSION "${FREECAD_LIBPACK_VERSION}" CACHE STRING "Version of the LibPack, if found" FORCE)
message("Found LibPack " ${FREECAD_LIBPACK_VERSION})
include(cMake/UseLibPack3.cmake)
else(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
set(FREECAD_LIBPACK_VERSION "NOTFOUND" CACHE STRING "Displays if the libpack has been found" FORCE)
message(SEND_ERROR "Could not find LibPack in specified location:" ${FREECAD_LIBPACK_DIR})
message(SEND_ERROR "Could not find libpack in specified location:" ${FREECAD_LIBPACK_DIR})
endif(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
# -------------------------------- PyCXX --------------------------------
find_package(PyCXX REQUIRED)
find_package(PyCXX REQUIRED)
# -------------------------------- Swig ----------------------------------
find_package(SWIG)
find_package(SWIG)
if(NOT SWIG_FOUND)
message("==================================================\n"
"SWIG not found, don't build SWIG binding for pivy.\n"
"==================================================\n")
endif(NOT SWIG_FOUND)
if(NOT SWIG_FOUND)
message("==================================================\n"
"SWIG not found, don't build SWIG binding for pivy.\n"
"==================================================\n")
endif(NOT SWIG_FOUND)
# -------------------------------- Salome SMESH --------------------------
if(NOT FREECAD_USE_EXTERNAL_SMESH)
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
endif()
if(NOT FREECAD_USE_EXTERNAL_SMESH)
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
endif()
endif(FREECAD_LIBPACK_USE)
endif(FREECAD_LIBPACK_USE)
endmacro(FreeCADLibpackChecks)
@@ -8,13 +8,11 @@ macro(InitializeFreeCADBuildOptions)
option(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
option(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
option(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
option(FREECAD_USE_EXTERNAL_FMT "Use system installed fmt library if available instead of fetching the source." ON)
option(FREECAD_USE_EXTERNAL_ONDSELSOLVER "Use system installed OndselSolver instead of git submodule." OFF)
option(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
option(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
option(BUILD_WITH_CONDA "Set ON if you build FreeCAD with conda" OFF)
option(BUILD_DYNAMIC_LINK_PYTHON "If OFF extension-modules do not link against python-libraries" ON)
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" ON)
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" OFF)
option(OCCT_CMAKE_FALLBACK "disable usage of occt-config files" OFF)
if (WIN32 OR APPLE)
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF)
@@ -27,6 +25,7 @@ macro(InitializeFreeCADBuildOptions)
option(FREECAD_RELEASE_PDB "Create PDB files for Release version." ON)
option(FREECAD_RELEASE_SEH "Enable Structured Exception Handling for Release version." ON)
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." ON)
option(FREECAD_LIBPACK_USEPYSIDE "Use PySide in LibPack rather to PyQt and Swig." ON)
option(FREECAD_USE_PCH "Activate precompiled headers where it's used." ON)
if (DEFINED ENV{FREECAD_LIBPACK_DIR})
@@ -55,18 +54,14 @@ macro(InitializeFreeCADBuildOptions)
option(FREECAD_COPY_PLUGINS_BIN_TO_BUILD "Copy plugins to the build directory." OFF)
endif()
else()
message(WARNING Could not locate ${FREECAD_LIBPACK_DIR}/plugins/imageformats/qsvg.dll)
message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
message(STATUS "Visit: https://github.com/FreeCAD/FreeCAD-Libpack/releases/ for Windows libpack downloads.")
message(STATUS "Visit: https://github.com/apeltauer/FreeCAD/releases/ for Windows libpack downloads.")
endif()
elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
option(FREECAD_WARN_ERROR "Make all warnings into errors. " OFF)
else(MSVC)
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
set(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
endif(MSVC)
ChooseQtVersion()
option(BUILD_QT5 "Build with Qt5." ON)
# https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
set(FREECAD_USE_OCC_VARIANT "Community Edition" CACHE STRING "Official OpenCASCADE version or community edition")
@@ -75,6 +70,14 @@ macro(InitializeFreeCADBuildOptions)
"Community Edition"
)
if (BUILD_QT5)
set(FREECAD_USE_QTWEBMODULE "Automatic" CACHE STRING "Qt Webkit or Qt WebEngine")
set_property(CACHE FREECAD_USE_QTWEBMODULE PROPERTY STRINGS
"Automatic"
"Qt Webkit"
"Qt WebEngine"
)
endif()
configure_file(${CMAKE_SOURCE_DIR}/src/QtOpenGL.h.cmake ${CMAKE_BINARY_DIR}/src/QtOpenGL.h)
option(BUILD_DESIGNER_PLUGIN "Build and install the designer plugin" OFF)
@@ -107,25 +110,26 @@ macro(InitializeFreeCADBuildOptions)
option(BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF)
option(BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF)
option(BUILD_ADDONMGR "Build the FreeCAD addon manager module" ON)
option(BUILD_BIM "Build the FreeCAD BIM module" ON)
option(BUILD_ARCH "Build the FreeCAD Architecture module" ON)
option(BUILD_COMPLETE "Build the FreeCAD complete module" OFF)
option(BUILD_DRAFT "Build the FreeCAD draft module" ON)
option(BUILD_DRAWING "Build the FreeCAD drawing module" OFF)
option(BUILD_HELP "Build the FreeCAD help module" ON)
option(BUILD_DRAWING "Build the FreeCAD drawing module" ON)
option(BUILD_IDF "Build the FreeCAD idf module" ON)
option(BUILD_IMAGE "Build the FreeCAD image module" ON)
option(BUILD_IMPORT "Build the FreeCAD import module" ON)
option(BUILD_INSPECTION "Build the FreeCAD inspection module" ON)
option(BUILD_JTREADER "Build the FreeCAD jt reader module" OFF)
option(BUILD_MATERIAL "Build the FreeCAD material module" ON)
option(BUILD_MESH "Build the FreeCAD mesh module" ON)
option(BUILD_MESH_PART "Build the FreeCAD mesh part module" ON)
option(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" ON)
option(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" OFF)
option(BUILD_OPENSCAD "Build the FreeCAD openscad module" ON)
option(BUILD_PART "Build the FreeCAD part module" ON)
option(BUILD_PART_DESIGN "Build the FreeCAD part design module" ON)
option(BUILD_CAM "Build the FreeCAD CAM module" ON)
option(BUILD_ASSEMBLY "Build the FreeCAD Assembly module" ON)
option(BUILD_PATH "Build the FreeCAD path module" ON)
option(BUILD_PLOT "Build the FreeCAD plot module" ON)
option(BUILD_POINTS "Build the FreeCAD points module" ON)
option(BUILD_RAYTRACING "Build the FreeCAD ray tracing module" ON)
option(BUILD_REVERSEENGINEERING "Build the FreeCAD reverse engineering module" ON)
option(BUILD_ROBOT "Build the FreeCAD robot module" ON)
option(BUILD_SHOW "Build the FreeCAD Show module (helper module for visibility automation)" ON)
@@ -133,44 +137,26 @@ macro(InitializeFreeCADBuildOptions)
option(BUILD_SPREADSHEET "Build the FreeCAD spreadsheet module" ON)
option(BUILD_START "Build the FreeCAD start module" ON)
option(BUILD_TEST "Build the FreeCAD test module" ON)
option(BUILD_MEASURE "Build the FreeCAD Measure module" ON)
option(BUILD_TECHDRAW "Build the FreeCAD Technical Drawing module" ON)
option(BUILD_TUX "Build the FreeCAD Tux module" ON)
option(BUILD_WEB "Build the FreeCAD Web module" ON)
option(BUILD_WEB "Build the FreeCAD web module" ON)
option(BUILD_SURFACE "Build the FreeCAD surface module" ON)
option(BUILD_VR "Build the FreeCAD Oculus Rift support (need Oculus SDK 4.x or higher)" OFF)
option(BUILD_CLOUD "Build the FreeCAD cloud module" OFF)
option(ENABLE_DEVELOPER_TESTS "Build the FreeCAD unit tests suit" ON)
if(MSVC OR APPLE)
set(FREECAD_3DCONNEXION_SUPPORT "NavLib" CACHE STRING "Select version of the 3Dconnexion device integration")
set_property(CACHE FREECAD_3DCONNEXION_SUPPORT PROPERTY STRINGS "None" "NavLib" "Legacy" "Both")
else(MSVC OR APPLE)
option(FREECAD_USE_3DCONNEXION_LEGACY "Enable support for 3Dconnexion devices." ON)
endif(MSVC OR APPLE)
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "NavLib")
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
elseif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Both")
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
set(FREECAD_USE_3DCONNEXION_LEGACY ON)
elseif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Legacy")
set(FREECAD_USE_3DCONNEXION_LEGACY ON)
elseif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "None")
set(FREECAD_USE_3DCONNEXION_NAVLIB OFF)
set(FREECAD_USE_3DCONNEXION_LEGACY OFF)
endif()
if(APPLE AND FREECAD_USE_3DCONNEXION_LEGACY)
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)
if(NOT (IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK}))
set(FREECAD_USE_3DCONNEXION_LEGACY OFF)
endif()
endif()
if(MSVC)
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF) # 3/5/2021 current LibPack uses non-C++17 FLANN
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
elseif(APPLE)
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)
if(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
else(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." OFF)
endif(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
else(MSVC)
set(FREECAD_USE_3DCONNEXION OFF )
endif(MSVC)
if(NOT MSVC)
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" OFF)
@@ -188,10 +174,10 @@ macro(InitializeFreeCADBuildOptions)
set(BUILD_SMESH ON )
endif()
# for Windows the minimum required cmake version is 3.4.3 to build the CAM module
# for Windows the minimum required cmake version is 3.4.3 to build the Path module
if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.4.3)
message(WARNING "Disable CAM, requires cmake >= 3.4.3 in order to build this module")
set(BUILD_CAM OFF )
message(WARNING "Disable Path, requires cmake >= 3.4.3 in order to build this module")
set(BUILD_PATH OFF )
endif()
# force build directory to be different to source directory
+255 -210
View File
@@ -1,222 +1,267 @@
macro(PrintFinalReport)
# -------------------------------- The final report ----------------------------------
# name and value
macro(simple)
set(name ${ARGV0})
set(value ${ARGV1})
if(NOT value)
set(value "-undefined-")
endif()
string(APPEND name ": ")
string(SUBSTRING ${name} 0 28 nameStr)
list(APPEND simpleLines "${nameStr} ${value}")
endmacro()
message(STATUS "\n==============\n"
"Summary report\n"
"==============\n")
if (DEFINED CMAKE_BUILD_TYPE)
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
endif()
# just a value
macro(value)
unset(val)
set(name ${ARGV0})
if(${name})
set(val ${${name}}) # name has a value
elseif(DEFINED ${name})
set(val "OFF ") #!
endif()
simple(${name} ${val})
endmacro()
# conditional data
macro(conditional)
set(name ${ARGV0})
set(condition ${ARGV1})
set(ifFalse ${ARGV2})
set(ifTrue ${ARGV3})
if(${condition})
set(out ${ifTrue})
else()
set(out ${ifFalse})
endif()
simple(${name} ${out})
endmacro()
function(section_begin name)
unset(simpleLines PARENT_SCOPE)
message("\n ==============\n"
" ${name}\n"
" ==============\n")
endfunction()
function(section_end)
list(SORT simpleLines CASE INSENSITIVE)
foreach(line ${simpleLines})
message(STATUS ${line})
endforeach()
endfunction()
############## System ####################
section_begin(System)
simple(Compiler "${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
value(CMAKE_VERSION)
simple(prefix ${CMAKE_INSTALL_PREFIX})
simple(bindir ${CMAKE_INSTALL_BINDIR})
simple(datadir ${CMAKE_INSTALL_DATADIR})
simple(docdir ${CMAKE_INSTALL_DOCDIR})
simple(includedir ${CMAKE_INSTALL_INCLUDEDIR})
simple(libdir ${CMAKE_INSTALL_LIBDIR})
simple(Python "${Python3_VERSION} [${PYTHON_EXECUTABLE}] Suffix: [${PYTHON_CONFIG_SUFFIX}]")
value(BLAS)
section_end()
############## Config ####################
section_begin(Config)
value(CMAKE_CXX_STANDARD)
value(CMAKE_CXX_FLAGS)
value(CMAKE_BUILD_TYPE)
value(ENABLE_DEVELOPER_TESTS)
value(FREECAD_USE_FREETYPE)
value(FREECAD_USE_EXTERNAL_SMESH)
value(BUILD_SMESH)
value(BUILD_VR)
value(CMAKE_PREFIX_PATH)
value(FREECAD_QT_VERSION)
value(PYTHON_EXECUTABLE)
value(PYTHON_LIBRARY)
value(FREECAD_CREATE_MAC_APP)
value(FREECAD_USE_PYBIND11)
value(FREECAD_USE_EXTERNAL_KDL)
value(BUILD_ADDONMGR)
value(BUILD_BIM)
value(BUILD_ASSEMBLY)
value(BUILD_CLOUD)
value(BUILD_DRAFT)
value(BUILD_DRAWING)
value(BUILD_FEM)
value(BUILD_GUI)
value(BUILD_HELP)
value(BUILD_IDF)
value(BUILD_IMPORT)
value(BUILD_INSPECTION)
value(BUILD_JTREADER)
value(BUILD_MATERIAL)
value(BUILD_MESH)
value(BUILD_MESH_PART)
value(BUILD_OPENSCAD)
value(BUILD_PART)
value(BUILD_PART_DESIGN)
value(BUILD_CAM)
value(BUILD_PLOT)
value(BUILD_POINTS)
value(BUILD_REVERSEENGINEERING)
value(BUILD_ROBOT)
value(BUILD_SANDBOX)
value(BUILD_SHOW)
value(BUILD_SKETCHER)
value(BUILD_SPREADSHEET)
value(BUILD_START)
value(BUILD_SURFACE)
value(BUILD_MEASURE)
value(BUILD_TECHDRAW)
value(BUILD_TEST)
value(BUILD_TUX)
value(BUILD_WEB)
value(CMAKE_INSTALL_PREFIX)
value(USE_CUDA)
value(USE_OPENCV)
value(FREECAD_LIBPACK_USE)
section_end()
################ Libraries ##################
section_begin(Libraries)
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
message(STATUS "Flags: ${CMAKE_CXX_FLAGS}")
message(STATUS "Standard: Requires C++${CMAKE_CXX_STANDARD}")
# Qt5 needs/sets PYTHON_CONFIG_SUFFIX regarding Shiboken
conditional(pybind11 pybind11_FOUND "not enabled" ${pybind11_VERSION})
simple(Boost ${Boost_VERSION})
simple(XercesC "${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
simple(ZLIB "${ZLIB_VERSION_STRING}")
simple(OCC "${OCC_VERSION_STRING} [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
simple(OCC_Libs "[${OCC_LIBRARIES}]")
message(STATUS "Python: ${PYTHON_VERSION_STRING} [${PYTHON_EXECUTABLE}] [${PYTHON_CONFIG_SUFFIX}]")
if(DEFINED PCL_FOUND)
message(STATUS "PCL: ${PCL_VERSION}")
else(DEFINED PCL_FOUND)
message(STATUS "PCL: not enabled")
endif(DEFINED PCL_FOUND)
if(DEFINED pybind11_FOUND)
message(STATUS "pybind11: ${pybind11_VERSION}")
else(DEFINED pybind11_FOUND)
message(STATUS "pybind11: not enabled")
endif(DEFINED pybind11_FOUND)
message(STATUS "Boost: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} (${Boost_VERSION})")
message(STATUS "XercesC: ${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
message(STATUS "ZLIB: ${ZLIB_VERSION_STRING}")
message(STATUS "PyCXX: ${PYCXX_VERSION} [${PYCXX_INCLUDE_DIR}]")
message(STATUS "OCC: ${OCC_VERSION_STRING} [${OCC_LIBRARIES}] [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
if(BUILD_SMESH)
if(FREECAD_USE_EXTERNAL_SMESH)
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
else()
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK} build internal")
simple(MEDFile "${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
simple(HDF5 ${HDF5_VERSION})
simple(VTK ${VTK_VERSION})
endif()
else()
simple(SMESH "do not build")
endif()
conditional(NETGEN NETGEN_FOUND
"not enabled"
"${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH} (${NETGEN_VERSION}) [${NETGEN_DEFINITIONS}] [${NETGEN_CXX_FLAGS}] [${NGLIB_INCLUDE_DIR}] [${NGLIB_LIBRARIES}] [${NETGEN_INCLUDE_DIRS}]"
)
#simple(OpenCV ${OpenCV_VERSION})
conditional(SWIG SWIG_FOUND "not found" ${SWIG_VERSION})
conditional(Eigen3 EIGEN3_FOUND "not found" ${EIGEN3_VERSION})
conditional(QtConcurrent BUILD_GUI "not needed" ${QtConcurrent_VERSION})
simple(QtCore ${QtCore_VERSION})
simple(QtNetwork ${QtNetwork_VERSION})
conditional(QtOpenGL BUILD_GUI "not needed" ${QtOpenGL_VERSION})
conditional(QtPrintSupport BUILD_GUI "not needed" ${QtPrintSupport_VERSION})
conditional(QtSvg BUILD_GUI "not needed" ${QtSvg_VERSION})
conditional(QtUiTools BUILD_GUI "not needed" ${QtUiTools_VERSION})
conditional(QtWidgets BUILD_GUI "not needed" ${QtWidgets_VERSION})
simple(QtXml ${QtXml_VERSION})
conditional(QtTest ENABLE_DEVELOPER_TESTS "not needed" ${QtTest_VERSION})
message(STATUS "SMESH: ${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
else(FREECAD_USE_EXTERNAL_SMESH)
message(STATUS "SMESH: build internal")
message(STATUS " MEDFile: ${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
message(STATUS " HDF5: ${HDF5_VERSION}")
message(STATUS " VTK: ${VTK_VERSION}")
endif(FREECAD_USE_EXTERNAL_SMESH)
else(BUILD_SMESH)
message(STATUS "SMESH: do not build")
endif(BUILD_SMESH)
if(DEFINED NETGEN_FOUND)
message(STATUS "NETGEN: ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH} (${NETGEN_VERSION}) [${NETGEN_DEFINITIONS}] [${NETGEN_CXX_FLAGS}] [${NGLIB_INCLUDE_DIR}] [${NGLIB_LIBRARIES}] [${NETGEN_INCLUDE_DIRS}]")
else(DEFINED NETGEN_FOUND)
message(STATUS "NETGEN: not enabled")
endif(DEFINED NETGEN_FOUND)
#message(STATUS "OpenCV: ${OpenCV_VERSION}")
if(DEFINED SWIG_FOUND)
message(STATUS "SWIG: ${SWIG_VERSION}")
else(DEFINED SWIG_FOUND)
message(STATUS "SWIG: not found")
endif(DEFINED SWIG_FOUND)
if(DEFINED EIGEN3_FOUND)
message(STATUS "Eigen3 ${EIGEN3_VERSION}")
else(DEFINED EIGEN3_FOUND)
message(STATUS "Eigen3: not found")
endif(DEFINED EIGEN3_FOUND)
message(STATUS "Qt5Core: ${Qt5Core_VERSION}")
message(STATUS "Qt5Network: ${Qt5Network_VERSION}")
message(STATUS "Qt5Xml: ${Qt5Xml_VERSION}")
message(STATUS "Qt5XmlPatterns: ${Qt5XmlPatterns_VERSION}")
if (BUILD_GUI)
conditional(DesignerPlugin BUILD_DESIGNER_PLUGIN
"not built (BUILD_DESIGNER_PLUGIN is OFF)"
"[${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}]"
)
endif()
conditional(Shiboken Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND "not found" "${Shiboken_VERSION} [${SHIBOKEN_INCLUDE_DIR}]")
conditional(PySide PySide${PYSIDE_MAJOR_VERSION}_FOUND "not found" "${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
conditional(PySideTools PYSIDE_TOOLS_FOUND
"not found"
"v: ${PySideTools_VERSION} uic: [${PYSIDE_UIC_EXECUTABLE}] rcc: [${PYSIDE_RCC_EXECUTABLE}]"
)
if(FREECAD_USE_FREETYPE)
conditional(Freetype FREETYPE_FOUND "not found" ${FREETYPE_VERSION_STRING})
else()
simple(Freetype "disabled")
endif()
simple(OpenGL_Lib [${OPENGL_gl_LIBRARY}])
simple(OpenGLU_Lib [${OPENGL_glu_LIBRARY}])
simple(OpenGLU_Incl [${OPENGL_INCLUDE_DIR}])
simple(Coin3D "${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
simple(pivy ${PIVY_VERSION})
if(WIN32 OR APPLE)
if(FREECAD_USE_3DCONNEXION_LEGACY AND FREECAD_USE_3DCONNEXION_NAVLIB)
simple(3Dconnexion "Building with 3Dconnexion legacy and NavLib support")
elseif(FREECAD_USE_3DCONNEXION_LEGACY)
simple(3Dconnexion "Building with 3Dconnexion legacy support")
elseif(FREECAD_USE_3DCONNEXION_NAVLIB)
simple(3Dconnexion "Building with 3Dconnexion NavLib support")
else()
simple(3Dconnexion "Not building 3Dconnexion device support")
message(STATUS "Qt5Widgets: ${Qt5Widgets_VERSION}")
message(STATUS "Qt5PrintSupport: ${Qt5PrintSupport_VERSION}")
message(STATUS "Qt5OpenGL: ${Qt5OpenGL_VERSION}")
message(STATUS "Qt5Svg: ${Qt5Svg_VERSION}")
message(STATUS "Qt5UiTools: ${Qt5UiTools_VERSION}")
message(STATUS "Qt5Concurrent: ${Qt5Concurrent_VERSION}")
if(BUILD_WEB)
if (Qt5WebKitWidgets_FOUND)
message(STATUS "Qt5WebKitWidgets: ${Qt5WebKitWidgets_VERSION}")
endif()
if (Qt5WebEngineWidgets_FOUND)
message(STATUS "Qt5WebEngineWidgets: ${Qt5WebEngineWidgets_VERSION}")
endif()
else(BUILD_WEB)
message(STATUS "Qt5WebKitWidgets: not needed (BUILD_WEB)")
message(STATUS "Qt5WebEngineWidgets: not needed (BUILD_WEB)")
endif(BUILD_WEB)
if(BUILD_DESIGNER_PLUGIN)
message(STATUS "Designer plugin: ${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}")
else(BUILD_DESIGNER_PLUGIN)
message(STATUS "Designer plugin: not built per user request (BUILD_DESIGNER_PLUGIN)")
endif(BUILD_DESIGNER_PLUGIN)
if(${Qt5WinExtras_FOUND})
message(STATUS "Qt5WinExtras: ${Qt5WinExtras_VERSION}")
endif()
else()
conditional(SPNAV SPNAV_FOUND "not found" "[${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
endif()
conditional(Matplotlib MATPLOTLIB_FOUND "not found" "${MATPLOTLIB_VERSION} PathDirs: ${MATPLOTLIB_PATH_DIRS}")
else(BUILD_GUI)
message(STATUS "Qt5Widgets: not needed")
message(STATUS "Qt5PrintSupport: not needed")
message(STATUS "Qt5OpenGL: not needed")
message(STATUS "Qt5Svg: not needed")
message(STATUS "Qt5UiTools: not needed")
message(STATUS "Qt5Concurrent: not needed")
message(STATUS "Qt5WebKitWidgets: not needed")
endif(BUILD_GUI)
if(DEFINED MACPORTS_PREFIX)
if(DEFINED Shiboken_FOUND)
message(STATUS "Shiboken: ${Shiboken_VERSION} [${SHIBOKEN_INCLUDE_DIR}]")
else(DEFINED Shiboken_FOUND)
message(STATUS "Shiboken: not found (only searched if MACPORTS_PREFIX is defined)")
endif(DEFINED Shiboken_FOUND)
if(DEFINED PySide_FOUND)
message(STATUS "PySide: ${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
if(NOT PYSIDE_INCLUDE_DIR)
message(STATUS " IncludeDir: Unable to find, python version mismatch?")
endif(NOT PYSIDE_INCLUDE_DIR)
else(DEFINED PySide_FOUND)
message(STATUS "PySide: not found (only searched if MACPORTS_PREFIX is defined)")
endif(DEFINED PySide_FOUND)
endif(DEFINED MACPORTS_PREFIX)
if(DEFINED Shiboken2_FOUND)
message(STATUS "Shiboken2: ${Shiboken2_VERSION} [${Shiboken2_DIR}] [${SHIBOKEN_INCLUDE_DIR}]")
else(DEFINED Shiboken2_FOUND)
message(STATUS "Shiboken2: not found")
endif(DEFINED Shiboken2_FOUND)
if(DEFINED PySide2_FOUND)
message(STATUS "PySide2: ${PySide2_VERSION} [${PYSIDE_INCLUDE_DIR}]")
if(NOT PYSIDE_INCLUDE_DIR)
message(STATUS " IncludeDir: Unable to find, python version mismatch?")
endif(NOT PYSIDE_INCLUDE_DIR)
else(DEFINED PySide2_FOUND)
message(STATUS "PySide2: not found")
endif(DEFINED PySide2_FOUND)
if(DEFINED PYSIDE2_TOOLS_FOUND)
message(STATUS "PySide2Tools: [${PYSIDE2UICBINARY}] [${PYSIDE2RCCBINARY}]")
else(DEFINED PYSIDE2_TOOLS_FOUND)
message(STATUS "PySide2Tools: not found")
endif(DEFINED PYSIDE2_TOOLS_FOUND)
if(FREECAD_USE_FREETYPE)
if(DEFINED FREETYPE_FOUND)
message(STATUS "Freetype: ${FREETYPE_VERSION_STRING}")
else(DEFINED FREETYPE_FOUND)
message(STATUS "Freetype: not found")
endif(DEFINED FREETYPE_FOUND)
else(FREECAD_USE_FREETYPE)
message(STATUS "Freetype: disabled")
endif(FREECAD_USE_FREETYPE)
message(STATUS "OpenGL: ${OPENGL_gl_LIBRARY}")
message(STATUS "OpenGLU: [${OPENGL_glu_LIBRARY}][${OPENGL_INCLUDE_DIR}]")
message(STATUS "Coin3D: ${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
message(STATUS "Pivy: ${PIVY_VERSION}")
if (WIN32)
#message(STATUS "SPNAV: not available yet for your OS") # FREECAD_USE_3DCONNEXION instead...
else(WIN32)
if(DEFINED SPNAV_FOUND)
message(STATUS "SPNAV: [${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
else(DEFINED SPNAV_FOUND)
message(STATUS "SPNAV: not found")
endif(DEFINED SPNAV_FOUND)
endif(WIN32)
if(MATPLOTLIB_FOUND)
message(STATUS "Matplotlib: ${MATPLOTLIB_VERSION}")
else(MATPLOTLIB_FOUND)
message(STATUS "Matplotlib: not found")
endif(MATPLOTLIB_FOUND)
if(BUILD_VR)
conditional(Rift RIFT_FOUND "not found" ${Rift_VERSION})
else()
simple(Rift "not enabled (BUILD_VR)")
if(DEFINED RIFT_FOUND)
message(STATUS "Rift: ${Rift_VERSION}")
else(DEFINED RIFT_FOUND)
message(STATUS "Rift: not found")
endif(DEFINED RIFT_FOUND)
else(BUILD_VR)
message(STATUS "Rift: not enabled (BUILD_VR)")
endif(BUILD_VR)
if(DOXYGEN_FOUND)
message(STATUS "Doxygen: ${DOXYGEN_VERSION}")
message(STATUS " Language: ${DOXYGEN_LANGUAGE}")
if(COIN3D_DOC_FOUND)
message(STATUS " Coin3D_DOC: found [${COIN3D_DOC_PATH}]")
else(COIN3D_DOC_FOUND)
message(STATUS " Coin3D_DOC: not found")
endif(COIN3D_DOC_FOUND)
else(DOXYGEN_FOUND)
message(STATUS "Doxygen: not found")
endif(DOXYGEN_FOUND)
if(MSVC)
# Copy libpack dependency directories to build folder for user as part of overall build process
if(FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
if(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
message(STATUS "=======================================\n"
"Copying libpack dependency directories to build directory for Windows MSVC build.\n")
file(COPY ${FREECAD_LIBPACK_DIR}/bin/assistant.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/bin/qt.conf DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
message(STATUS "... end copying.\n=======================================\n")
endif(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
if(COPY_LIBPACK_BIN_TO_BUILD)
if(FREECAD_COPY_LIBPACK_BIN_TO_BUILD)
message("=======================================\n"
"Copying libpack 'bin' directory to build directory.\n")
file(COPY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_BINARY_DIR})
message("... done copying libpack 'bin' directory.\n=======================================\n")
endif()
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
message(STATUS "=======================================\n"
"Copying plugins to build directory.")
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
endif()
endif()
if(FREECAD_INSTALL_DEPEND_DIRS)
# Test install command for installing/copying directories
message(STATUS "=======================================")
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_INSTALL_PREFIX}/translations)
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_INSTALL_PREFIX})
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
message(STATUS "Created install commands for INSTALL target.\n")
endif(FREECAD_INSTALL_DEPEND_DIRS)
endif(FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
endif()
conditional(Doxygen DOXYGEN_FOUND "not found" "${DOXYGEN_VERSION} Language: ${DOXYGEN_LANGUAGE}")
conditional(Coin3D_DOC COIN3D_DOC_FOUND "not found" ${COIN3D_DOC_PATH})
conditional(PYCXX PYCXX_FOUND "not found" "${PYCXX_VERSION} Incl: ${PYCXX_INCLUDE_DIR} Src:${PYCXX_SOURCE_DIR}")
conditional(fmt fmt_FOUND "Sources downloaded to ${fmt_SOURCE_DIR}" "${fmt_VERSION}")
conditional(yaml-cpp yaml-cpp_FOUND "not found" "${yaml-cpp_VERSION}")
section_end()
endmacro()
# Print message to start build process
message("=================================================\n"
"Now run 'cmake --build ${CMAKE_BINARY_DIR}' to build ${PROJECT_NAME}\n"
"=================================================\n")
endmacro(PrintFinalReport)
@@ -21,9 +21,8 @@ macro(SetGlobalCompilerAndLinkerSettings)
if(MSVC)
# set default compiler settings
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR -DNOMINMAX)
add_compile_options(/Zm150 /bigobj)
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zm150 /bigobj")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG /Zm150 /bigobj")
# set default libs
set (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
@@ -34,24 +33,17 @@ macro(SetGlobalCompilerAndLinkerSettings)
if(FREECAD_RELEASE_PDB)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
endif(FREECAD_RELEASE_PDB)
if(FREECAD_RELEASE_SEH)
# remove /EHsc or /EHs flags because they are incompatible with /EHa
if (${CMAKE_BUILD_TYPE} MATCHES "Release")
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "/EHs" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "/EHs" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHa")
endif()
endif(FREECAD_RELEASE_SEH)
if(CCACHE_PROGRAM)
# By default Visual Studio generators will use /Zi which is not compatible
# with ccache, so tell Visual Studio to use /Z7 instead.
string(REGEX REPLACE "/Z[iI]" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REGEX REPLACE "/Z[iI]" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE "/Z[iI]" "/Z7" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
endif(CCACHE_PROGRAM)
option(FREECAD_USE_MP_COMPILE_FLAG "Add /MP flag to the compiler definitions. Speeds up the compile on multi processor machines" ON)
option(FREECAD_USE_MP_COMPILE_FLAG "Add /MP flag to the compiler definitions. Speeds up the compile on multi processor machines" ON)
if(FREECAD_USE_MP_COMPILE_FLAG)
# set "Build with Multiple Processes"
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
@@ -91,5 +83,4 @@ macro(SetGlobalCompilerAndLinkerSettings)
link_libraries(-lgdi32)
endif()
endif(MINGW)
endmacro(SetGlobalCompilerAndLinkerSettings)
@@ -5,6 +5,6 @@ macro(SetLibraryVersions)
set(HAVE_OCC_VERSION 1)
endif(OCC_INCLUDE_DIR AND EXISTS ${OCC_INCLUDE_DIR}/Standard_Version.hxx)
configure_file(${CMAKE_SOURCE_DIR}/src/LibraryVersions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/LibraryVersions.h)
configure_file(LibraryVersions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/LibraryVersions.h)
endmacro(SetLibraryVersions)
+7 -40
View File
@@ -1,44 +1,11 @@
macro(SetupCoin3D)
# -------------------------------- Coin3D --------------------------------
# -------------------------------- Coin3D --------------------------------
if (WIN32 AND MINGW)
find_path(COIN3D_INCLUDE_DIRS Inventor/So.h)
find_library(COIN3D_LIBRARIES Coin)
endif ()
# Try MODULE mode
find_package(Coin3D)
if (NOT COIN3D_FOUND)
# Try CONFIG mode
find_package(Coin CONFIG REQUIRED)
if (Coin_FOUND)
set(COIN3D_INCLUDE_DIRS ${Coin_INCLUDE_DIR})
set(COIN3D_LIBRARIES ${Coin_LIBRARIES})
endif ()
ENDIF ()
IF (NOT COIN3D_VERSION)
file(READ "${COIN3D_INCLUDE_DIRS}/Inventor/C/basic.h" _coin3d_basic_h)
string(REGEX MATCH "define[ \t]+COIN_MAJOR_VERSION[ \t]+([0-9?])" _coin3d_major_version_match "${_coin3d_basic_h}")
set(COIN3D_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+COIN_MINOR_VERSION[ \t]+([0-9?])" _coin3d_minor_version_match "${_coin3d_basic_h}")
set(COIN3D_MINOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+COIN_MICRO_VERSION[ \t]+([0-9?])" _coin3d_micro_version_match "${_coin3d_basic_h}")
set(COIN3D_MICRO_VERSION "${CMAKE_MATCH_1}")
set(COIN3D_VERSION "${COIN3D_MAJOR_VERSION}.${COIN3D_MINOR_VERSION}.${COIN3D_MICRO_VERSION}")
ENDIF ()
IF (NOT PIVY_VERSION)
message(STATUS "Checking Pivy version by importing it in a Python program...")
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')"
OUTPUT_VARIABLE PIVY_VERSION
RESULT_VARIABLE RETURN_CODE)
if (RETURN_CODE EQUAL 0)
message(STATUS "Found Pivy ${PIVY_VERSION}")
else ()
message(ERROR "Failed to import Pivy using ${Python3_EXECUTABLE}")
endif ()
ENDIF ()
find_package(Coin3D REQUIRED)
if(NOT COIN3D_FOUND)
message(FATAL_ERROR "=================\n"
"Coin3D not found.\n"
"=================\n")
endif(NOT COIN3D_FOUND)
endmacro(SetupCoin3D)
+2 -2
View File
@@ -11,14 +11,14 @@ macro(SetupEigen)
"=================\n")
endif(NOT EIGEN3_FOUND)
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.1")
if (${EIGEN3_VERSION} VERSION_LESS "3.3.1")
message(WARNING "Disable module flatmesh because it requires "
"minimum Eigen3 version 3.3.1 but version ${EIGEN3_VERSION} was found")
set (BUILD_FLAT_MESH OFF)
endif()
# Older versions raise the warning -Wdeprecated-copy with clang10/gcc10
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.8")
if (${EIGEN3_VERSION} VERSION_LESS "3.3.8")
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
if (_flag_found)
-48
View File
@@ -1,48 +0,0 @@
macro(SetupLibFmt)
# This internet check idea is borrowed from:
# https://stackoverflow.com/questions/62214621/how-to-check-for-internet-connection-with-cmake-automatically-prevent-fails-if
if(FREECAD_USE_EXTERNAL_FMT)
find_package(fmt QUIET)
endif()
if(fmt_FOUND)
message(STATUS "find_package() was used to locate fmt version ${fmt_VERSION}")
else()
message(STATUS "Checking for connection to GitHub...")
if (WIN32)
set(ping_command "ping /n 1 /w 3 github.com")
else()
set(ping_command "ping -c 1 -W 3 github.com")
endif()
execute_process(
COMMAND ${ping_command}
RESULT_VARIABLE NO_CONNECTION
)
if(NO_CONNECTION GREATER 0)
set(FETCHCONTENT_UPDATES_DISCONNECTED ON)
message(WARNING "NO INTERNET CONNECTION: Using disconnected mode for FetchContent updates")
else()
message(STATUS "GitHub connection established for FetchContent")
set(FETCHCONTENT_UPDATES_DISCONNECTED OFF)
endif()
include(FetchContent)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()
FetchContent_Declare(fmt
URL https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip
URL_MD5 e6754011ff56bfc37631fcc90961e377
)
FetchContent_MakeAvailable(fmt)
set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON)
if(${fmt_POPULATED})
message(STATUS "fmt was downloaded using FetchContent into ${fmt_SOURCE_DIR}")
else()
message(ERROR "Failed to install the fmt library")
endif()
endif()
endmacro()
@@ -1,4 +0,0 @@
macro(SetupOndselSolverCpp)
# -------------------------------- OndselSolver --------------------------------
find_package(OndselSolver REQUIRED)
endmacro(SetupOndselSolverCpp)
-4
View File
@@ -1,4 +0,0 @@
macro(SetupYamlCpp)
# -------------------------------- YamlCpp --------------------------------
find_package(yaml-cpp REQUIRED)
endmacro(SetupYamlCpp)
+154 -13
View File
@@ -1,21 +1,162 @@
macro(SetupPython)
# -------------------------------- Python --------------------------------
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
# For building on OS X
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT BUILD_WITH_CONDA)
# For backwards compatibility with old CMake scripts
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
set(PYTHON_LIBRARY_DIRS ${Python3_LIBRARY_DIRS})
set(PYTHON_VERSION_STRING ${Python3_VERSION})
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR})
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH})
set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
# If the user doesn't tell us which package manager they're using
if(NOT DEFINED MACPORTS_PREFIX AND NOT DEFINED HOMEBREW_PREFIX)
if (${PYTHON_VERSION_STRING} VERSION_LESS "3.8")
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.8\n")
# Try to find MacPorts path
find_program(MACPORTS_EXECUTABLE port)
if(EXISTS ${MACPORTS_EXECUTABLE})
string(REPLACE "/bin/port" ""
MACPORTS_PREFIX ${MACPORTS_EXECUTABLE})
message(STATUS "Detected MacPorts install at ${MACPORTS_PREFIX}")
endif(EXISTS ${MACPORTS_EXECUTABLE})
# Try to find Homebrew path
find_program(HOMEBREW_EXECUTABLE brew)
if(EXISTS ${HOMEBREW_EXECUTABLE})
string(REPLACE "/bin/brew" ""
HOMEBREW_PREFIX ${HOMEBREW_EXECUTABLE})
message(STATUS "Detected Homebrew install at ${HOMEBREW_PREFIX}")
endif()
endif(NOT DEFINED MACPORTS_PREFIX AND NOT DEFINED HOMEBREW_PREFIX)
# In case someone tries to shoot themselves in the foot
if(DEFINED MACPORTS_PREFIX AND DEFINED HOMEBREW_PREFIX)
message(SEND_ERROR
"Multiple package management systems detected - ")
message(SEND_ERROR
"define either MACPORTS_PREFIX or HOMEBREW_PREFIX")
# No package manager
elseif(NOT DEFINED MACPORTS_PREFIX AND NOT DEFINED HOMEBREW_PREFIX)
message(SEND_ERROR
"No package manager detected - install MacPorts or Homebrew")
# The hopefully-normal case - one package manager identified
else(DEFINED MACPORTS_PREFIX AND DEFINED HOMEBREW_PREFIX)
# Construct a list like python;python2.9;python2.8;...
set(Python_ADDITIONAL_VERSIONS_REV ${Python_ADDITIONAL_VERSIONS})
list(REVERSE Python_ADDITIONAL_VERSIONS_REV)
set(_PYTHON_NAMES "python")
foreach(_PYTHON_VERSION IN LISTS Python_ADDITIONAL_VERSIONS_REV)
list(APPEND _PYTHON_NAMES "python${_PYTHON_VERSION}")
endforeach(_PYTHON_VERSION)
# Find python in the package management systems, using names in that
# list in decreasing priority. Note that a manually specified
# PYTHON_EXECUTABLE still has prescedence over this.
find_program(PYTHON_EXECUTABLE
NAMES ${_PYTHON_NAMES}
PATHS ${MACPORTS_PREFIX} ${HOMEBREW_PREFIX}
PATH_SUFFIXES /bin
NO_DEFAULT_PATH)
endif(DEFINED MACPORTS_PREFIX AND DEFINED HOMEBREW_PREFIX)
# Warn user if we still only have the system Python
string(FIND ${PYTHON_EXECUTABLE} "/usr/bin/python" _FIND_SYS_PYTHON)
if(_FIND_SYS_PYTHON EQUAL 0)
message(SEND_ERROR
"Only found the stock Python, that's probably bad.")
endif(_FIND_SYS_PYTHON EQUAL 0)
# Ask Python to tell us it's include directory, if nobody else has
if(NOT DEFINED PYTHON_INCLUDE_DIR)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
"from distutils.sysconfig import get_python_inc;print(get_python_inc())"
OUTPUT_VARIABLE PYTHON_INCLUDE_DIR
RESULT_VARIABLE PYTHON_INCLUDE_DIR_RESULT
ERROR_QUIET)
if(NOT PYTHON_INCLUDE_DIR_RESULT MATCHES 0)
message(SEND_ERROR "Failed to determine PYTHON_INCLUDE_DIR")
endif(NOT PYTHON_INCLUDE_DIR_RESULT MATCHES 0)
endif(NOT DEFINED PYTHON_INCLUDE_DIR)
# Similar for the Python library - there must be an easier way...
if(NOT DEFINED PYTHON_LIBRARY)
# Get the library path
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c
"from distutils import sysconfig;print(sysconfig.get_config_var('LIBDIR'))"
OUTPUT_VARIABLE PYTHON_LIBRARY_DIR
RESULT_VARIABLE PYTHON_LIBRARY_DIR_RESULT
ERROR_QUIET)
string(STRIP ${PYTHON_LIBRARY_DIR} PYTHON_LIBRARY_DIR)
if(NOT PYTHON_LIBRARY_DIR_RESULT MATCHES 0)
message(SEND_ERROR "Failed to determine PYTHON_LIBRARY")
endif(NOT PYTHON_LIBRARY_DIR_RESULT MATCHES 0)
# Get library filename - might not be safe to assume .dylib extension?
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c
"import sys;print('libpython%d.%d.dylib'%sys.version_info[0:2])"
OUTPUT_VARIABLE PYTHON_LIBRARY_FILE
RESULT_VARIABLE PYTHON_LIBRARY_FILE_RESULT
ERROR_QUIET)
string(STRIP ${PYTHON_LIBRARY_FILE} PYTHON_LIBRARY_FILE)
if(NOT PYTHON_LIBRARY_FILE_RESULT MATCHES 0)
message(SEND_ERROR "Failed to determine PYTHON_LIBRARY")
endif(NOT PYTHON_LIBRARY_FILE_RESULT MATCHES 0)
set(PYTHON_LIBRARY "${PYTHON_LIBRARY_DIR}/${PYTHON_LIBRARY_FILE}")
else(NOT DEFINED PYTHON_LIBRARY)
# Used on MacPorts systems for finding Shiboken and PySide
# TODO: When we start requiring minimum CMake version above
# 2.8.11, change PATH below to DIRECTORY
get_filename_component(PYTHON_LIBRARY_DIR ${PYTHON_LIBRARY} PATH)
endif(NOT DEFINED PYTHON_LIBRARY)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT BUILD_WITH_CONDA)
if(${CMAKE_VERSION} VERSION_LESS "3.12")
set(Python_ADDITIONAL_VERSIONS ${Python_ADDITIONAL_VERSIONS} "3.10" "3.9" "3.8" "3.7" "3.6")
find_package(PythonInterp REQUIRED)
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
if (NOT DEFINED PYTHON_VERSION_STRING)
find_package(PythonLibs REQUIRED)
else (NOT DEFINED PYTHON_VERSION_STRING)
find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
endif(NOT DEFINED PYTHON_VERSION_STRING)
if(NOT PYTHONLIBS_FOUND)
message(FATAL_ERROR "=================================\n"
"Python not found, install Python!\n"
"=================================\n")
endif()
# For forward compatibility with new CMake scripts
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
set(Python3_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARY_DIRS ${PYTHON_LIBRARY_DIRS})
set(Python3_VERSION ${PYTHON_VERSION_STRING})
set(Python3_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
set(Python3_VERSION_MINOR ${PYTHON_VERSION_MINOR})
set(Python3_VERSION_PATCH ${PYTHON_VERSION_PATCH})
set(Python3_Interpreter_FOUND ${PYTHONINTERP_FOUND})
else()
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
# For backwards compatibility with old CMake scripts
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
set(PYTHON_LIBRARY_DIRS ${Python3_LIBRARY_DIRS})
set(PYTHON_VERSION_STRING ${Python3_VERSION})
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR})
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH})
set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
endif()
# prevent python3 lower than 3.6
if (${PYTHON_VERSION_STRING} VERSION_LESS "3.6")
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.6\n")
endif()
endmacro(SetupPython)

Some files were not shown because too many files have changed in this diff Show More