Compare commits

..

103 Commits

Author SHA1 Message Date
Adrián Insaurralde Avalos b9bfa5c550 Increment point release number in cmake and windows installer 2023-11-13 23:33:39 -03:00
Adrián Insaurralde Avalos e9b426d561 Fix windows uninstaller issue #10971 and #11232 2023-11-13 23:33:39 -03:00
wandererfan 36bde55f05 [TD]fix regression on Links with scale 2023-11-13 15:29:18 -05:00
0penBrain c6c35bd2d3 Fix #9465 - Coin version on Mac Conda builds causes transform crash
with this solution, we have traded a crash for a memory leak. so it is only activated for MAC OS where we have the crash, until we find a better solution.
2023-11-12 18:27:37 -03:00
Roy-043 930079cdcf Arch: Fix multiple issues with ImportOBJ.py
Fixes #6187.

Other fixes:
* Made handling of shapes and global placement more consistent.
* Shapes without curves were also triangulated.
* Polygonal faces could have flipped normals and duplicate points.
2023-11-12 19:20:31 +01:00
Roy-043 b8eb92fdc6 Arch: Read and write object.Label on Wavefront OBJ import and export
Fixes #5635.
Fixes #5636.
2023-11-12 19:18:27 +01:00
Adrián Insaurralde Avalos 9d03a07005 Fix 10545 by using position of array members 2023-11-11 15:12:17 -03:00
wandererfan 47d68ac6a2 [TD]fix selection highlighting from tree 2023-11-11 12:09:12 -03:00
wandererfan 58e3b7200d [TD]fix #10440 Balloon arrow end point 2023-11-11 11:47:44 -03:00
wandererfan 09fb4dba8f [TD]add support for view menu zoom 2023-11-11 11:45:24 -03:00
wandererfan a2a26839ff [TD]fix keyboard zoomIn/zoomOut for Touchpad mode 2023-11-11 11:41:47 -03:00
Syres916 ec5ed6baf1 [Gui] Fix color bar position and text (#10552)
* [Gui] Fix ColorBar position and labelling

* [Gui] Improve formatting

* [Gui] ColorBar adjusts if user squashes window height

* [Gui] Changes following feedback
2023-11-11 11:27:25 -03:00
wmayer 0c0c434575 Gui: filter warning about dead keys
Forum thread: https://forum.freecad.org/viewtopic.php?t=80981
2023-11-11 11:24:41 -03:00
Zheng, Lei f51f9e3c1f Gui: fix selection of nested object in App::Part 2023-11-11 11:15:18 -03:00
Victor Predko 2187c8dc56 Spreadsheet: export CSV file extension by default
Fixes #10829
2023-11-11 11:09:59 -03:00
Florian Foinant-Willig adc26e8031 TechDraw: Fix #10919 crash at geometry deletion 2023-11-11 11:08:16 -03:00
Roy-043 cbfb641436 Merge pull request #11295 from Roy-043/Draft-improved-props_changed_placement_only-function
Draft: improved props_changed_placement_only function
2023-11-11 15:05:35 +01:00
Roy-043 3771ccb75a Merge pull request #11280 from Roy-043/Arch-Fix-issue-with-getSceneGraph
Arch: Fix issue with getSceneGraph
2023-11-11 15:05:35 +01:00
Roy-043 52c82d163b Draft: renaming of anno style could fail
The error occurred if the style was in use.
2023-11-11 15:05:35 +01:00
Roy-043 b291ffc231 Draft: clone IfcType and Subvolume properties
Fixes #11186.
2023-11-11 15:05:35 +01:00
Roy-043 baf37cb1cc Arch: fix Placement multiplication for subvolumes
Fixes #11185.

Same problem as in #6617.
2023-11-11 15:05:35 +01:00
bdieterm cf9ed2b070 Part: allow reduction of Part ViewProvider tesselation resolution
Problem description
To display a shape, the ViewProvider creates a mesh of the shape data. The
resolution depends also on the two parameters "Angular Deflection" and
"Deviation" in the View properties. (The values of these parameters are also
updated for all objects when changing these settings in the Preferences
dialog).
Changing the parameters from a high value to a lower value has an immediate
effect on the displayed shape -- for example a circle will be displayed finer
with more line segments. But changing the parameter back to the higher value
(with less resolution) will keep the finer view-mesh instead of calculating a
coarser one. To get back to the coarse view, the object has to be manually
recomputed or the file re-opened.

Solution
I just set the meshing parameter AllowQualityDecrease to True. I guess that
this was not implemented before because this parameter is quite new (introduced
in OCC v7.5 in the year 2020).
2023-11-11 15:05:35 +01:00
Florian Foinant-Willig a9c9d8ba87 Part: fix crash with null face 2023-11-11 11:04:00 -03:00
Florian Foinant-Willig 198e7ef9b5 Fix #10910 2023-11-11 10:59:19 -03:00
wandererfan 9aebd3fe5a [TD]fix fail on unmeshed shape 2023-11-11 10:57:10 -03:00
0penBrain 1642ebbe58 [Bugfix]Gui: in draggers, remove/detach all callbacks + add checks and asserts, hopefully fixes #9465 2023-11-10 17:58:14 -03:00
xtemp09 c6091324f0 [GUI] Fix memory leak in ViewProviderPlane.cpp 2023-11-10 16:39:02 -03:00
Adrián Insaurralde Avalos fc8980aeb3 File formats: Uppercase file types when importing a file. (#10977)
* Added uppercase extensions for supported formats

In the file App\Application.cpp

* Added file types in upper case

* Adds uppercase file types to the file import filter.

Fixes #10879

* Added filter for *.fcmacro *.fcscript
2023-11-10 16:38:10 -03:00
Adrian Insaurralde Avalos 83c85c79c3 Migrate away from deprecated distutils python package where possible 2023-11-10 16:30:47 -03:00
Adrián Insaurralde Avalos e11d5dff7d Fem: Connect constraint temperature spinboxes to properties and task dialog rework - fixes #11109 2023-11-10 16:29:06 -03:00
Adrián Insaurralde Avalos 381a743295 Import: fixes #10983: Crash when trying to import a DXF file with Polosh letters in the name 2023-11-10 16:19:15 -03:00
pavltom bb88d3b5bb [TechDraw] - Fix issue #10094 2023-11-09 03:06:11 -03:00
Paddle f9950cb1db SplashScreen : Add "ShowSplasherMessages" parameter to disable labels from the splashscreen. 2023-11-09 03:04:54 -03:00
Adrián Insaurralde Avalos 76e1410f53 Gui: fixes issue #9422: Dependency Graph: export to .dot/.gv 2023-11-09 03:01:44 -03:00
didendron 7e0c640c1c Gui: Add cancel button to transform task UI dialog
Fixes #7517
2023-11-09 02:51:33 -03:00
wmayer 27ae66475d Part: fix crash in Geometry::Restore()
If a project contains an unknown geometry extension then the attempt to create it returns a null pointer which isn't checked and causes a segmentation fault.

See also forum: https://forum.freecad.org/viewtopic.php?t=81091
2023-11-09 01:56:26 -03:00
wmayer 4f0e0e6edc Part: fix encoding issue in BOPProgressIndicator::Show 2023-11-09 01:55:47 -03:00
wmayer 239f5a0d98 Gui: fixes #10724: TaskView gets truncated 2023-11-09 01:53:52 -03:00
wmayer ef6c15373e Gui: fix possible memory leak if inappropriate view provider is created
Example code:
doc = App.newDocument()
doc.addObject(type = "Part::Feature", viewType = "MeshGui::ViewProviderMesh")
2023-11-09 01:51:54 -03:00
wmayer fbe2fef66c App: fixes #10460: App::PropertyPythonObject is not saving data
Since Py3.11 the methods names __setstate__ and __getstate__ conflict with the method names added to the object class.
Thus rename them to 'loads' and 'dumps'
2023-11-09 01:45:32 -03:00
wmayer 844c20cfa8 Gui: fixes #10782: Unable to cancel Select module Open obj messagebox 2023-11-09 01:41:36 -03:00
wmayer 6841532641 Gui: Initial save of a document doesn't have the expected thumbnail
When saving the thumbnail there is a check if the 3D window is the active window. This check fails if a document is saved for the first time because
the appearing file dialog causes the 3D window to not be active any more. Thus, no snapshot of the 3D window will be created and the program logo will be
saved instead. A workaround is to save the document twice.

This PR removes the check for the active window so that the snapshot can be created. The issue might be related to #10937.
2023-11-09 01:39:01 -03:00
Adrián Insaurralde Avalos eb07bad7da Start: fixes #10221: /tmp/FreeCADStartThumbnails* directories are not removed when FreeCAD terminates
The commit adds some new functions:

* getThumbnailDir()
  Returns the path to the thumbnail directory which is a sub-directory of the Cache directory.
  There is no need to always create a unique directory after each restart because it doesn't harm
  if the thumbnail directoy contains deprecated files.

* createThumbnailDir()
  Creates the thumbnail directoy if it doesn't exist yet.

* getSha1Hash
  Helper function to compute a SHA-1 hash of a given path. If the same path is passed
  then the hash value will be the same.
  This way it can be avoided to create a different image file from a project file
  after each restart.

* getUniquePNG
  Computes the path of a PNG image file for a given project file. It's also possible
  to pass an arbitrary string as argument.

* useCachedPNG
  If the PNG image exists and if it's newer than the project file True is returned
  and False otherwise.

The changes in detail are:
1. For a given project file it is checked if the thumbnail directory already contains
   a cached image. If it's newer than the project file it will used, otherwise it will
   be re-created.

2. For the system icon to a given file format it is only checked if the icon already exists.
   If yes, it will be used.
2023-11-09 01:37:39 -03:00
Adrián Insaurralde Avalos 621aea2d10 [Start] Fix Python 3.11 Unicode Errors
Example Error :
  File "/home/john/freecad-daily-build/Mod/Start/StartPage/StartPage.py", line 422, in handle
    ALTCSS = f.read()
             ^^^^^^^^
  File "/usr/lib/python3.11/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 421: ordinal not in range(128)

    main (FreeCAD/FreeCAD#10535)
2023-11-09 01:21:38 -03:00
wmayer 5f6a5bf6e4 App: the function findLicense() uses the '==' operator to compare two C strings.
This is wrong and leads to failures under Windows.
2023-11-09 01:08:47 -03:00
wmayer 419d53381b fixes #10063: Part_SectionCut does not work if the view is in perspective 2023-11-09 00:48:17 -03:00
wmayer 4f436f7c0c Gui: fix size policy of placement dialog 2023-11-09 00:40:08 -03:00
Adrian Insaurralde Avalos 26af24b711 AddonManager: handle the case of symlinked addon when uninstalling
see #11045
2023-11-09 00:39:23 -03:00
wmayer 916a1146b2 Gui: fixes #11045: Freecad fails to start after uninstalling disabled addon
The PR refactors FindPreferencePacksInPackage() and splits program logic from exception handling. It also handles std::exception to give more
information about a possible failure
2023-11-09 00:38:57 -03:00
wmayer bf765f88d2 Mesh: disable potentially unsafe code in Wm4 library 2023-11-09 00:37:55 -03:00
wmayer cc41382933 TD: fix QGIViewPart::highlightMoved 2023-11-09 00:37:40 -03:00
wmayer ddc2d98f2c TD: fix GeometryMatcher::compareBSplines 2023-11-09 00:37:01 -03:00
wmayer a82f870f6a PD: wrong direction determined for linear pattern
A selected edge of a sketch is not in local coordinates and thus its corresponding axis mustn't be multiplied with the sketch placement as
this will lead to a wrong direction vector.

Forum: https://forum.freecad.org/viewtopic.php?t=82022
2023-11-09 00:35:57 -03:00
Camille 06f62a710c Fix issue #10144 [Problem] FreeCAD freezes when clicking inside spreadsheet - see issue for detailed explanation. 2023-11-09 00:27:11 -03:00
wmayer 20dcef6af0 PD: fixes #11197: If bounding box of Body is activated it will be done for each sub-feature 2023-11-09 00:19:03 -03:00
wmayer dc12da981b Gui: issue #9205: Default settings make it hard to select objects in the 3D window
backported from PR #11187
2023-11-06 16:23:36 -03:00
wmayer f8069ede36 TD: fix possible crash in QGIWeldSymbol::customBoundingRect()
Forum thread: https://forum.freecad.org/viewtopic.php?t=80203
2023-10-22 20:38:40 +02:00
Connor Worrell 5a740cfe68 [GUI] QuantitySpinBox Regex Optimization #10067 Ammendum 2023-10-22 20:37:39 +02:00
Connor Worrell 76fd25f9de [GUI] QuantitySpinBox: Regex optimization. 2023-10-22 20:37:24 +02:00
Roy-043 35a59ac38c Draft: importSVG: handle viewBox in mm (PR10929 fix was not correct) (#11143) 2023-10-22 20:29:08 +02:00
Roy-043 5a4648e581 Draft: importDXF: fix off layer bug (#11090)
* Draft: importDXF fix off layer bug

Fixes #10254.

* Typo

* Typo 2
2023-10-19 18:03:37 +02:00
Roy-043 d0f3d63ef8 Draft: Import DXF: handle arc angles larger than 360 degrees
See #10985.
2023-10-19 18:01:22 +02:00
Roy-043 885343c435 Draft: Use DXF OCS when importing circles and arcs to Part shapes
See #10985.
2023-10-19 18:00:43 +02:00
Roy-043 ddd6f544e5 Arch: ArchFrame typos when checking enum values 2023-10-10 11:27:35 +02:00
Roy-043 a252d1571d Draft: importSVG: handle viewBox in mm
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81696
2023-10-04 12:55:49 +02:00
Roy-043 12af1e764d Draft: get_movable_children: prevent endless loop
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81547
2023-09-29 12:38:58 +02:00
Rexbas 83538ba3cd Gui: Improve accuracy for navigation cube's rotate to nearest feature
(cherry picked from commit c2bf9efc7d)
2023-09-25 12:04:20 +02:00
Rexbas 34e4bf9e44 Gui: Improve object center rotation mode
(cherry picked from commit fcbee3ad49)
2023-09-25 12:03:25 +02:00
wmayer 15def85b29 pre-commit: Avoid automatic commits for backport fixes 2023-09-24 16:02:22 -05:00
Roy-043 4d98082de0 Arch: avoid intersecting solids in windows and doors with openings
With the current code, if you place a simple door and change its Opening property to 50, the door leaf and the frame intersect. This PR fixes that issue.
2023-09-21 14:13:49 +02:00
Yorik van Havre 5b964fa338 Merge pull request #10711 from Roy-043/Arch-Fix-Arch_Fence-section-placement
Arch: Fix Arch_Fence section placement
2023-09-18 19:35:59 +02:00
Yorik van Havre 948ffd940e Merge pull request #10712 from Roy-043/Draft-shape2dview-avoid-issues-with-intersecting-solids
Draft: shape2dview: avoid issues with intersecting solids
2023-09-18 19:35:30 +02:00
Roy-043 b00fa5ea7f Draft: Fix for PR10673 (#10699)
Fixes an issue that was missed in #10673.
2023-09-16 17:19:19 +02:00
Roy-043 0570197f8e Draft: V0.21 version of getPlaneRotation caused a dimension bug (#10673)
`DraftVecUtils.getPlaneRotation` can now return None. The `view_dimension.py` code did not handle that.
2023-09-13 17:04:38 +02:00
Roy-043 083ebf2a0e Draft: importSVG.py: check and fix path faces
Fixes #10659.
2023-09-13 13:06:31 +02:00
wmayer cc93256813 Mesh: fixes issue #10075: 3MF files exported from FreeCAD don't work in PrusaSlicer
Add an option to force to always write a mesh as model type even if it's not a solid

This change is backported from master
2023-09-06 08:15:16 +02:00
wmayer 5ab2894828 Base: fixes #10462: mesh.unite() causes segementaion fault 2023-09-03 15:09:35 +02:00
Chris Hennes f6708547a9 CMake: Increment point release number 2023-08-30 21:32:05 -05:00
Roy-043 21824c7f60 Draft: importDWG.py wrongly assumed that opt directory always exists on Linux (#10447)
Forum topic:
https://forum.freecad.org/viewtopic.php?p=703063#p703061
2023-08-30 18:13:16 +02:00
sliptonic da2bc3ba8b fixes #10113
packaging.version.parse() will raise InvalidVersion in some cases but the error isn't caught.
2023-08-30 10:55:54 -05:00
David Kaufman cc31a0f6ae [Path] Make RampDressup accept other dressups as its base operation 2023-08-30 10:55:54 -05:00
Harald Hartmann 41790d996b add estlcam_post.py 2023-08-30 10:55:54 -05:00
Syres916 4fc6b3d830 [0.21] [Gui] Py311 Initialization of locales... (#3)
* [0.21] [MainGui] Py311add initialization of locales ...

... with native environment setting

* [0.21][Gui] use '%Y-%m-%d %H:%M:%S' as format string for date
2023-08-29 16:26:16 -05:00
bdieterm c64d89507d Core: escape filepath characters in FreeCAD.loadFile 2023-08-28 10:37:37 -05:00
wmayer 3c52ca8cc6 Part: fix possible crash in ViewProviderPartExt::getDetail 2023-08-25 19:11:36 +02:00
wmayer b53e11ad26 App: fix possible crash in ComplexGeoData::getSubElementByName 2023-08-25 19:10:27 +02:00
Roy-043 a7bf4f33f8 [TD]revert change to PdfVersion_A1b
Fixes #10283.
2023-08-21 20:19:18 +02:00
Chris Hennes 7878610a7d Merge pull request #10280 from Syres916/Backport_Sketcher_Profiles_Icon
[0.21][Sketcher] Fix minor icon missing bug...
2023-08-20 10:40:48 -05:00
Syres916 89c28543a2 [0.21][Sketcher] Fix minor icon missing bug...
...icon was moved to obsolete in 2020
Backport of https://github.com/FreeCAD/FreeCAD/commit/fec225ddccc911d3e8d921a26abde183c18bdb76
2023-08-20 11:34:46 +01:00
qewer33 b6c4b0b9fb Fix StartPage javascript error when switching tabs 2023-08-19 21:30:21 +02:00
Jonas Bähr 65ed955565 Fix build of "tests" on macOS
Building the C++ unit tests failed for
 tests/src/Mod/Sketcher/App/SketchObject.cpp
because some XML headers were not found. This was because the XercesC
include dir was not in the search list for headers.

Details:
> In file included from /Users/jonas/src/FreeCAD/FreeCAD-git/tests/src/Mod/Sketcher/App/SketchObject.cpp:7:
> In file included from /Users/jonas/src/FreeCAD/FreeCAD-git/src/App/Application.h:33:
> /Users/jonas/src/FreeCAD/FreeCAD-git/src/Base/Parameter.h:55:10: fatal error: 'xercesc/util/XercesDefs.hpp' file not found
> #include <xercesc/util/XercesDefs.hpp>
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is the same issue as already adresses previously with PR9657 [1] but
the test for SketchObject was added later [2].

[1]: https://github.com/FreeCAD/FreeCAD/pull/9657
[2]: https://github.com/FreeCAD/FreeCAD/commit/532b391b6971c7ce1dee4bbe0e782ce070051db9
2023-08-13 08:17:26 -07:00
Jonas Bähr 561ae14204 minor reformat: break lines, one per item 2023-08-13 08:17:26 -07:00
Roy-043 bf645981dd Draft: make_sketch should not change Autoconstraints of sketch (#10181) 2023-08-13 11:37:18 +02:00
Roy-043 ab97f80507 Draft: Fix SVG "Edges not ordered" issue (#10116) 2023-08-13 11:36:18 +02:00
Chris Hennes 1294cb7ce5 Update translations 2023-08-08 18:55:57 -05:00
Syres916 0bb03bd219 [Import] Dxf Fix regression from https://github.com/FreeCAD/FreeCAD/commit/1f6fd1b
See discussion https://forum.freecad.org/viewtopic.php?t=80040&sid=9937b585c8681fe5a2d27f37dcd3f163
2023-08-04 14:52:05 +02:00
Adrián Insaurralde Avalos 41b058e208 Rename cmake flag for unit tests to ENABLE_DEVELOPER_TESTS
To differentiate from the previously existing BUILD_TEST that controls building the Test WB
2023-08-01 19:51:39 -05:00
Chris Hennes 97319cc665 Tools: commit the actual NSIS settings used for 0.21 2023-08-01 19:44:08 -05:00
Chris Hennes d89d0e26f7 Remove the 'dev' version indicator 2023-08-01 19:43:27 -05:00
Chris Hennes 148fae183c Update the README 2023-08-01 19:43:05 -05:00
Chris Hennes 463fb03ab6 Gui: Clarify message about FCbak 2023-08-01 23:59:16 +00:00
Yorik van Havre 27b446964a Merged crowdin translations 2023-08-01 12:52:38 +00:00
Paddle e5a00e153d Disable notification area by default for now because it's not polished enough for the 0.21 release. 2023-07-30 20:37:56 -05:00
9776 changed files with 1754857 additions and 2478639 deletions
+3 -6
View File
@@ -4,8 +4,7 @@ AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
@@ -15,7 +14,6 @@ AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
@@ -41,7 +39,7 @@ ContinuationIndentWidth: 4
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
InsertBraces: true
InsertBraces: false
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
@@ -50,7 +48,6 @@ ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: Never
PointerAlignment: Left
ReflowComments: true
SortIncludes: Never
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
@@ -61,7 +58,7 @@ SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
+3 -6
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,-readability-qualified-auto'
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
-29
View File
@@ -73,32 +73,3 @@ 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
+24 -15
View File
@@ -1,21 +1,24 @@
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"]
description: File an problem report
title: "[Problem] "
labels: ["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.
description: Please search to see if an issue already exists for the problem you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: description
- type: dropdown
id: version
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
label: Version
description: What version of FreeCAD are you running?
options:
- 0.20 (Release)
- 0.21 (Development)
validations:
required: true
- type: textarea
@@ -32,23 +35,30 @@ body:
label: Subproject(s) affected?
options:
- Addon Manager
- Assembly
- BIM
- CAM
- Arch
- Core
- Draft
- Expressions
- FEM
- File formats
- Mesh
- GCS
- OpenSCAD
- Part
- PartDesign
- Path
- Project Tools & Websites
- Sketcher
- Spreadsheet
- TechDraw
- Techdraw
- Other (specify in description)
- 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.
placeholder: Description of the problem
validations:
required: true
- type: textarea
id: anything_else
attributes:
@@ -56,7 +66,6 @@ body:
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:
@@ -65,7 +74,7 @@ body:
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)
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
+8
View File
@@ -0,0 +1,8 @@
Thank you for creating a pull request to contribute to FreeCAD! Place an "X" in between the brackets below to "check off" to confirm that you have satisfied the requirement, or ask for help in the [FreeCAD forum](https://forum.freecadweb.org/viewforum.php?f=10) if there is something you don't understand.
- [ ] Your Pull Request meets the requirements outlined in section 5 of [CONTRIBUTING.md](https://github.com/FreeCAD/FreeCAD/blob/master/CONTRIBUTING.md) for a Valid PR
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 [1.0 Changelog Forum Thread](https://forum.freecad.org/viewtopic.php?f=10&t=69438).
---
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
}
]
}
]
}
+1 -1
View File
@@ -103,7 +103,7 @@ jobs:
done
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ github.job }}-Logs
path: |
+4 -24
View File
@@ -39,29 +39,17 @@ jobs:
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:
Ubuntu_22-04:
needs: [Prepare]
uses: ./.github/workflows/sub_buildUbuntu2404Conda.yml
uses: ./.github/workflows/sub_buildUbuntu2204.yml
with:
artifactBasename: Ubuntu_24-04_Conda-${{ github.run_id }}
artifactBasename: Ubuntu_22-04-${{ github.run_id }}
Windows:
needs: [Prepare]
@@ -79,15 +67,7 @@ jobs:
changedPythonFiles: ${{ needs.Prepare.outputs.changedPythonFiles }}
WrapUp:
needs: [
Prepare,
Pixi,
MacOS_13_Conda_Apple,
Ubuntu_20-04,
Ubuntu_24-04_Conda,
Windows,
Lint
]
needs: [Prepare, Ubuntu_20-04, Ubuntu_22-04, Windows, Lint]
if: always()
uses: ./.github/workflows/sub_wrapup.yml
with:
@@ -46,13 +46,12 @@ runs:
steps:
- name: Build
id: build
shell: bash -l {0}
shell: bash
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}
shell: bash
if: always()
run: |
if [ ${{ steps.build.outcome }} == 'success' ]
@@ -50,13 +50,12 @@ runs:
steps:
- name: Configure CMake
id: configure
shell: bash -l {0}
shell: bash
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}
shell: bash
if: always()
run: |
if [ ${{ steps.configure.outcome }} == 'success' ]
@@ -28,9 +28,6 @@ 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"
@@ -40,8 +37,8 @@ runs:
using: "composite"
steps:
- id: generateCacheKey
shell: bash -l {0}
shell: bash
run: |
cacheKey=$(lsb_release -ds | tr -d ' ')-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)-qt${{ inputs.qt_major_version }}
cacheKey=$(lsb_release -ds | tr -d ' ')-$( basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)
echo "Generated cache key : $cacheKey"
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
@@ -46,13 +46,12 @@ runs:
steps:
- name: Install
id: install
shell: bash -l {0}
shell: bash
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}
shell: bash
if: always()
run: |
if [ ${{ steps.install.outcome }} == 'success' ]
@@ -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 }}
@@ -40,13 +40,6 @@ inputs:
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
@@ -54,55 +47,6 @@ runs:
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
@@ -110,16 +54,9 @@ runs:
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}
shell: bash
run: |
# Print global result
if [ ${{ job.status }} != "success" ]
@@ -139,3 +76,4 @@ runs:
echo "</blockquote>" >> ${{ inputs.reportFile }}
echo "</details>" >> ${{ inputs.reportFile }}
echo "" >> ${{ inputs.reportFile }}
@@ -44,14 +44,12 @@ runs:
using: "composite"
steps:
- name: Run C++ tests
shell: bash -l {0}
run: |
set -o pipefail
${{ inputs.testCommand }} | tee -a ${{ inputs.testLogFile }}
shell: bash
run: stdbuf -oL -eL ${{ inputs.testCommand }} |& tee -a ${{ inputs.testLogFile }}
- name: Parse test results
if: always()
id: report
shell: bash -l {0}
shell: bash
run: |
result=$(sed -ne "/Global test environment tear-down/,/^$/{/^$/d;p}" ${{ inputs.testLogFile }})
if grep -qF "[ FAILED ]" <<< $result
@@ -43,12 +43,11 @@ runs:
steps:
- name: Run tests
id: runTests
shell: bash -l {0}
shell: bash
run: |
set -o pipefail
${{ inputs.testCommand }} | sed -Ee "/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d" | tee -a ${{ inputs.logFile }}
stdbuf -oL -eL ${{ inputs.testCommand }} |& sed -Ee "/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d" | tee -a ${{ inputs.logFile }}
- name: Write report
shell: bash -l {0}
shell: bash
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 }}
@@ -41,11 +41,11 @@ inputs:
ccachedownloadpath:
description: "Path where to download ccache"
required: false
default: https://github.com/ccache/ccache/releases/download/v4.9/
default: https://github.com/ccache/ccache/releases/download/v4.7.4/
ccacheversion:
description: "Ccache version to be downloaded"
required: false
default: ccache-4.9-windows-x86_64
default: ccache-4.7.4-windows-x86_64
runs:
using: "composite"
@@ -55,11 +55,11 @@ runs:
run: |
mkdir -p ${{ inputs.ccachebindir }}
- name: Get cached version
uses: actions/cache/restore@v4
uses: actions/cache/restore@v3
id: getCached
with:
path: ${{ inputs.ccachebindir }}
key: ccacheforwin-${{ inputs.ccacheversion }}
key: ccacheforwin
- name: Download ccache
shell: bash
if: steps.getCached.outputs.cache-hit != 'true'
@@ -72,7 +72,7 @@ runs:
rm -rf ccachetemp
- name: Save version to cache
if: steps.getCached.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@v3
with:
path: ${{ inputs.ccachebindir }}
key: ${{ steps.getCached.outputs.cache-primary-key }}
@@ -41,11 +41,11 @@ inputs:
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
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/2.8.2/LibPack-OCC76-V2-8.7z
libpackname:
description: "Libpack name (once downloaded)"
required: false
default: LibPack-1.0.0-v3.0.0RC4-Release
default: LibPack-OCC76-V2
runs:
using: "composite"
@@ -55,11 +55,11 @@ runs:
run: |
mkdir -p ${{ inputs.libpackdir }}
- name: Get cached version
uses: actions/cache/restore@v4
uses: actions/cache/restore@v3
id: getCached
with:
path: ${{ inputs.libpackdir }}
key: libpackforwin-${{ inputs.libpackname }}
key: libpackforwin
- name: Download libpack
shell: bash
if: steps.getCached.outputs.cache-hit != 'true'
@@ -70,7 +70,7 @@ runs:
rm -rf libpacktemp
- name: Save version to cache
if: steps.getCached.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@v3
with:
path: ${{ inputs.libpackdir }}
key: ${{ steps.getCached.outputs.cache-primary-key }}
-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
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
pull-requests: write
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: ".github/labels.yml"
@@ -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 }}
+16 -33
View File
@@ -47,16 +47,11 @@ on:
jobs:
Build:
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
runs-on: 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_DIR: ${{ github.workspace }}/ccache
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
CCACHE_MAXSIZE: 1G
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
CCACHE_COMPRESS: true
@@ -65,8 +60,7 @@ jobs:
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/
builddir: ${{ github.workspace }}/build/
logdir: /tmp/logs/
reportdir: /tmp/report/
reportfilename: ${{ inputs.artifactBasename }}-report.md
@@ -77,24 +71,12 @@ jobs:
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
uses: actions/checkout@v3
- name: Install FreeCAD dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
ccache \
doxygen \
graphviz \
imagemagick \
@@ -123,16 +105,15 @@ jobs:
libqt5opengl5-dev \
libqt5svg5-dev \
libqt5x11extras5-dev \
libqt5xmlpatterns5-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 \
@@ -147,12 +128,17 @@ jobs:
python3-pyside2.qtgui \
python3-pyside2.qtnetwork \
python3-pyside2.qtsvg \
python3-pyside2.qtwebengine \
python3-pyside2.qtwebenginecore \
python3-pyside2.qtwebenginewidgets \
python3-pyside2.qtwebchannel \
python3-pyside2.qtwidgets \
python3-yaml \
qtbase5-dev \
qttools5-dev \
qtwebengine5-dev \
shiboken2 \
swig \
ccache \
xvfb
- name: Make needed directories, files and initializations
id: Init
@@ -168,11 +154,9 @@ jobs:
uses: ./.github/workflows/actions/linux/generateCacheKey
with:
compiler: ${{ env.CXX }}
qt_major_version: 5
- name: Restore Compiler Cache
uses: actions/cache@v4
uses: pat-s/always-upload-cache@v3
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
@@ -186,7 +170,6 @@ jobs:
- 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
@@ -207,7 +190,7 @@ jobs:
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "CLI tests on build dir"
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
testCommand: ${{ env.builddir }}bin/FreeCADCmd -t 0
logFile: ${{ env.logdir }}TestCLIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: FreeCAD GUI tests on build dir
@@ -251,7 +234,7 @@ jobs:
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
@@ -259,7 +242,7 @@ jobs:
/var/crash/*FreeCAD*
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ env.reportfilename }}
path: |
+247
View File
@@ -0,0 +1,247 @@
# 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 22.04 using Clang.
name: Build Ubuntu 22.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-22.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
#CC: /usr/bin/gcc
#CXX: /usr/bin/g++
CC: /usr/bin/clang
CXX: /usr/bin/clang++
builddir: ${{ github.workspace }}/build/
logdir: /tmp/logs/
reportdir: /tmp/report/
reportfilename: ${{ inputs.artifactBasename }}-report.md
defaults:
run:
shell: bash
outputs:
reportFile: ${{ steps.Init.outputs.reportFile }}
steps:
- name: Checking out source code
uses: actions/checkout@v3
- name: Install FreeCAD dependencies
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 \
libqt5xmlpatterns5-dev \
libshiboken2-dev \
libspnav-dev \
libvtk7-dev \
libx11-dev \
libxerces-c-dev \
libzipios++-dev \
netgen \
netgen-headers \
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.qtwebengine \
python3-pyside2.qtwebenginecore \
python3-pyside2.qtwebenginewidgets \
python3-pyside2.qtwebchannel \
python3-pyside2.qtwidgets \
qtbase5-dev \
qttools5-dev \
qtwebengine5-dev \
shiboken2 \
swig \
ccache \
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 }}
- name: Restore Compiler Cache
uses: pat-s/always-upload-cache@v3
with:
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:
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@v3
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
/var/crash/*FreeCAD*
- name: Upload report
if: always()
uses: actions/upload-artifact@v3
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 }}
+22 -12
View File
@@ -52,7 +52,7 @@ jobs:
#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/
builddir: C:/FC/build/
libpackdir: C:/FC/libpack/
ccachebindir: C:/FC/ccache/
logdir: C:/logs/
@@ -63,9 +63,7 @@ jobs:
steps:
- name: Checking out source code
uses: actions/checkout@v4
with:
submodules: true
uses: actions/checkout@v3
- name: Make needed directories, files and initializations
id: Init
run: |
@@ -85,9 +83,8 @@ jobs:
with:
libpackdir: ${{ env.libpackdir }}
- name: Restore compiler cache
uses: actions/cache@v4
uses: pat-s/always-upload-cache@v3
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-Windows-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
@@ -98,20 +95,30 @@ jobs:
. $env:ccachebindir\ccache -s
. $env:ccachebindir\ccache -z
. $env:ccachebindir\ccache -p
- name: Append Libpack bin directory to Path
if: false # Disabled because not enough to set FREECAD_COPY_LIBPACK_BIN_TO_BUILD=OFF
run: |
echo "${{ env.libpackdir }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- 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 }}"
-DPYTHON_DEBUG_LIBRARY="${{ env.libpackdir }}bin/libs/python38_d.lib"
-DPYTHON_EXECUTABLE="${{ env.libpackdir }}bin/python.exe"
-DPYTHON_INCLUDE_DIR="${{ env.libpackdir }}bin/include"
-DPYTHON_LIBRARY="${{ env.libpackdir }}bin/libs/python38.lib"
-DXercesC_INCLUDE_DIR="${{ env.libpackdir }}include"
-DXercesC_LIBRARY_RELEASE="${{ env.libpackdir }}lib/xerces-c_3.lib"
-DXercesC_LIBRARY_DEBUG="${{ env.libpackdir }}lib/xerces-c_3D.lib"
-DFREECAD_COPY_DEPEND_DIRS_TO_BUILD=ON
-DFREECAD_COPY_LIBPACK_BIN_TO_BUILD=ON
-DFREECAD_COPY_LIBPACK_BIN_TO_BUILD=OFF
-DFREECAD_COPY_PLUGINS_BIN_TO_BUILD=ON
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
uses: microsoft/setup-msbuild@v1.3
- name: Compiling sources
run: |
cd $env:builddir
@@ -119,17 +126,20 @@ jobs:
- name: Print Ccache statistics after build
run: |
. $env:ccachebindir\ccache -s
- name: Move libpack bin folder to build folder # Shorter in time than copying with CMake FREECAD_COPY_LIBPACK_BIN_TO_BUILD
run: |
Move-Item -Force -Path ${{ env.libpackdir }}bin -Destination ${{ env.builddir }}
- name: C++ unit tests
if: false # Disabled because seems to not function on Windows build
if: false # Disabled because seems to not exist 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
. ${{ env.builddir }}\test\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
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
+20 -16
View File
@@ -77,7 +77,7 @@ on:
type: boolean
required: false
cpplintFilters:
default: -whitespace-*
default: -build/c++11,-build/header_guard,-build/include,-build/include_alpha,-build/include_order,-build/include_subdir,-build/include_what_you_use,-build/namespaces,-legal/copyright,-readability/braces,-readability-braces-around-statements,-readability/casting,-readability/namespace,-readability/todo,-runtime/indentation_namespace,-runtime/int,-runtime/references,-whitespace/blank_line,-whitespace/braces,-whitespace/comma,-whitespace/comments,-whitespace/end_of_line,-whitespace/indent,-whitespace/line_length,-whitespace/newline,-whitespace/operators,-whitespace/parens,-whitespace/semicolon,-whitespace/tab,-whitespace/todo
type: string
required: false
cpplintLineLength:
@@ -129,7 +129,7 @@ on:
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/
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:
@@ -153,7 +153,7 @@ on:
type: boolean
required: false
clazyChecks:
default: level2,no-non-pod-global-static,no-copyable-polymorphic
default: level1
type: string
required: false
clazyFailSilent:
@@ -169,7 +169,7 @@ on:
type: string
required: false
QT6Branch: # branch to check for QT6 Porting
default: main
default: master
type: string
required: false
clazyQT6FailSilent:
@@ -198,9 +198,7 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
uses: actions/checkout@v3
- name: Make needed directories, files and initializations
id: Init
run: |
@@ -318,7 +316,7 @@ jobs:
pylintWarnings=0
pylintRefactorings=0
pylintConventions=0
pip install --break-system-packages pylint
pip install pylint
# List enabled pylint checks
pylint --list-msgs-enabled > ${{ env.logdir }}pylint-enabled-checks.log
# Run pylint on all python files
@@ -378,9 +376,9 @@ jobs:
run: |
blackReformats=0
blackFails=0
pip install --break-system-packages black
pip install black
set +e
black --line-length 100 --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
black --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
@@ -442,16 +440,17 @@ jobs:
libqt5opengl5-dev \
libqt5svg5-dev \
libqt5x11extras5-dev \
libqt5xmlpatterns5-dev \
libshiboken2-dev \
libspnav-dev \
libvtk9-dev \
libvtk7-dev \
libx11-dev \
libxerces-c-dev \
libyaml-cpp-dev \
libzipios++-dev \
netgen \
netgen-headers \
occt-draw \
pyqt5-dev-tools \
pyside2-tools \
python3-dev \
python3-git \
@@ -464,9 +463,14 @@ jobs:
python3-pyside2.qtgui \
python3-pyside2.qtnetwork \
python3-pyside2.qtsvg \
python3-pyside2.qtwebengine \
python3-pyside2.qtwebenginecore \
python3-pyside2.qtwebenginewidgets \
python3-pyside2.qtwebchannel \
python3-pyside2.qtwidgets \
qtbase5-dev \
qttools5-dev \
qtwebengine5-dev \
shiboken2 \
swig \
ccache \
@@ -515,7 +519,7 @@ jobs:
continue-on-error: ${{ inputs.cpplintFailSilent }}
run: |
cpplintErrors=0
pip install --break-system-packages cpplint
pip install cpplint
# Run cpplint
for file in ${{ inputs.changedCppFiles }}
do
@@ -580,7 +584,7 @@ jobs:
if: inputs.checkSpelling && always()
continue-on-error: ${{ inputs.codespellFailSilent }}
run: |
pip install --break-system-packages codespell
pip install 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
@@ -754,7 +758,7 @@ jobs:
[ $clazyQT6Errors -eq 0 ]
- name: Upload logs and fixes
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
@@ -762,7 +766,7 @@ jobs:
${{ env.fixesdir }}
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ env.reportfilename }}
path: |
+2 -2
View File
@@ -148,14 +148,14 @@ jobs:
echo "" >> $GITHUB_OUTPUT
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: ${{ env.reportfilename }}
path: |
+4 -4
View File
@@ -54,7 +54,7 @@ jobs:
run: |
mkdir -p ${{ env.artifactsDownloadDir }}
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
path: ${{ env.artifactsDownloadDir }}
- name: Save input data to file
@@ -83,8 +83,8 @@ jobs:
echo "### $icon $step step" >> report.md
if [ $result == 'skipped' ]
then
echo "Step was skipped, no report was generated" | tee -a report.md
continue
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
@@ -111,7 +111,7 @@ jobs:
cat report.md >> $GITHUB_STEP_SUMMARY
- name: Delete used artifacts
continue-on-error: true
uses: geekyeggo/delete-artifact@v5
uses: geekyeggo/delete-artifact@v2
with:
name: |
${{ env.usedArtifacts }}
+1 -16
View File
@@ -1,17 +1,9 @@
# file types to ignore
.*
!/.gitignore
!/.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
@@ -49,18 +41,11 @@ install_manifest.txt
/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
+6 -42
View File
@@ -4,54 +4,18 @@
# 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
tests/src
)
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
src|
tests/src
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@@ -59,11 +23,11 @@ repos:
- id: check-added-large-files
- id: mixed-line-ending
- repo: https://github.com/psf/black
rev: b965c2a5026f8ba399283ba3e01898b012853c79 # frozen: 24.8.0
rev: 22.12.0
hooks:
- id: black
args: ['--line-length', '100']
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 7d85583be209cb547946c82fbe51f4bc5dd1d017 # frozen: v18.1.8
rev: v15.0.7
hooks:
- id: clang-format
+12
View File
@@ -0,0 +1,12 @@
{
"configurations": [
{
"name": "FreeCAD",
"includePath": ["${workspaceFolder}/**"],
"cStandard": "c17",
"cppStandard": "c++17",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
+18
View File
@@ -0,0 +1,18 @@
[
{
"name": "FreeCAD Linux",
"compilers": {
"C": "${workspaceFolder}/.conda/freecad/bin/cc",
"CXX": "${workspaceFolder}/.conda/freecad/bin/c++"
},
"environmentSetupScript": "${workspaceFolder}/.vscode/env.sh"
},
{
"name": "FreeCAD macOS",
"compilers": {
"C": "${workspaceFolder}/.conda/freecad/bin/clang",
"CXX": "${workspaceFolder}/.conda/freecad/bin/clang++"
},
"environmentSetupScript": "${workspaceFolder}/.vscode/env.sh"
}
]
Vendored Executable
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
source activate freecad
+48
View File
@@ -0,0 +1,48 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++: Linux: build and debug FreeCAD",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/bin/FreeCAD",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"preLaunchTask": "CMake: build"
},
{
"name": "C/C++: macOS: build and debug FreeCAD",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/bin/FreeCAD",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "CMake: build"
},
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"preLaunchTask": "conda: activate environment",
"redirectOutput": true,
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}"
}
],
"justMyCode": false
}
]
}
+17
View File
@@ -0,0 +1,17 @@
{
"files.associations": {
"__config": "cpp",
"iosfwd": "cpp",
"vector": "cpp",
"tuple": "cpp"
},
"editor.formatOnType": true,
"cmake.preferredGenerators": ["Ninja", "NMake Makefiles"],
"cmake.cmakePath": "${workspaceFolder}/.conda/freecad/bin/cmake",
"cmake.configureSettings": {
"BUILD_WITH_CONDA:BOOL": "ON",
"BUILD_FEM_NETGEN:BOOL": "ON",
"FREECAD_USE_PYBIND11:BOOL": "ON",
"FREECAD_USE_EXTERNAL_SMESH:BOOL": "ON"
}
}
+58
View File
@@ -0,0 +1,58 @@
{
"tasks": [
{
"type": "shell",
"label": "conda: activate environment",
"command": "activate freecad",
"problemMatcher": [],
"detail": "Activate conda environment",
"group": "build"
},
{
"type": "cmake",
"label": "CMake: configure",
"command": "configure",
"problemMatcher": [],
"detail": "CMake template configure task",
"group": "build"
},
{
"type": "cmake",
"label": "CMake: build",
"command": "build",
"targets": ["all"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"detail": "CMake template build task"
},
{
"type": "cmake",
"label": "CMake: test",
"command": "test",
"problemMatcher": [],
"detail": "CMake template test task",
"group": "build"
},
{
"type": "cmake",
"label": "CMake: clean",
"command": "clean",
"problemMatcher": [],
"detail": "CMake template clean task",
"group": "build"
},
{
"type": "cmake",
"label": "CMake: clean rebuild",
"command": "cleanRebuild",
"targets": ["all"],
"problemMatcher": [],
"detail": "CMake template clean rebuild task",
"group": "build"
}
],
"version": "2.0.0"
}
+10 -17
View File
@@ -10,27 +10,23 @@ 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)
if (BUILD_WITH_CONDA AND WIN32)
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" OFF)
else()
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
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}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
endif()
project(FreeCAD)
set(PACKAGE_VERSION_MAJOR "1")
set(PACKAGE_VERSION_MINOR "0")
set(PACKAGE_VERSION_MAJOR "0")
set(PACKAGE_VERSION_MINOR "21")
set(PACKAGE_VERSION_PATCH "2") # number of patch release (e.g. "4" for the 0.18.4 release)
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)
@@ -54,8 +50,7 @@ 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 +64,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 +84,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)
@@ -110,8 +105,6 @@ if(MSVC AND FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
endif()
if (ENABLE_DEVELOPER_TESTS)
include(CTest)
enable_testing()
add_subdirectory(tests)
endif()
-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"
}
}
}
]
}
+1 -1
View File
@@ -55,7 +55,7 @@ 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
reported by contacting any of the community admins or moderators at
https://forum.freecad.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
+9 -13
View File
@@ -41,7 +41,7 @@ The FreeCAD Contribution Process is expressed here with the following specific g
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
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/master/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
@@ -56,7 +56,7 @@ The FreeCAD Contribution Process is expressed here with the following specific g
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.
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.
12. A “Valid PR” is one which satisfies the above requirements.
## 6. Process
@@ -87,18 +87,14 @@ The FreeCAD Contribution Process is expressed here with the following specific g
## 7. Branches and Releases
1. The project SHALL have one branch (“main”) that always holds the latest in-progress version and SHOULD always build.
1. The project SHALL have one branch (“master”) 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.
3. To make a stable release a Maintainer SHALL tag the repository. Stable releases SHALL always be released from the repository master.
## 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.
1. 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.
2. Contributors who have a history of successful PRs and have demonstrated continued professionalism should be invited to be Maintainers.
3. Administrators SHOULD remove Maintainers who are inactive for an extended period, or who repeatedly fail to apply this process accurately.
4. The list of Maintainers SHALL be publicly accessible and reflective of current activity on the project.
5. 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.
-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)
+9 -10
View File
@@ -1,8 +1,8 @@
<a href="https://freecad.org"><img src="/src/Gui/Icons/freecad.svg" height="100px" width="100px"></a>
<a href="https://freecad.org"><img src="https://www.freecad.org/svg/icon-freecad.svg" height="100px" width="100px"></a>
### Your own 3D parametric modeler
[Website](https://www.freecad.org) •
[Website](https://www.freecad.org) •
[Documentation](https://wiki.freecad.org) •
[Forum](https://forum.freecad.org/) •
[Bug tracker](https://github.com/FreeCAD/FreeCAD/issues) •
@@ -12,7 +12,7 @@
[![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)
<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
--------
@@ -78,19 +78,18 @@ 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)
- [Contributing](https://github.com/FreeCAD/FreeCAD/blob/master/CONTRIBUTING.md)
- [Help Forum](https://forum.freecad.org/viewforum.php?f=3)
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
+2 -2
View File
@@ -21,9 +21,9 @@ FreeCAD implements security fixes to the current release series, and to the curr
| Version | Supported |
|---------| ------------------ |
| 0.22dev | :white_check_mark: |
| 0.21 | :white_check_mark: |
| < 0.21 | :x: |
| 0.20.2 | :white_check_mark: |
| < 0.20 | :x: |
## Reporting a Vulnerability
+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)
+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 3)
endif(NOT Eigen3_FIND_VERSION_MAJOR)
if(NOT Eigen3_FIND_VERSION_MINOR)
set(Eigen3_FIND_VERSION_MINOR 0)
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}")
+5 -5
View File
@@ -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 6.3.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)
-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()
-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_PATH BUILD_PART BUILD_MESH)
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_START BUILD_WEB)
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET)
endmacro(CheckInterModuleDependencies)
+1 -14
View File
@@ -57,22 +57,9 @@ macro(ChooseQtVersion)
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")
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()
@@ -42,11 +42,9 @@ 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)
endif()
@@ -75,11 +73,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,7 +89,9 @@ 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
@@ -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,40 +1,29 @@
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...")
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)
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()
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()
if(COPY_LIBPACK_BIN_TO_BUILD)
if(FREECAD_COPY_LIBPACK_BIN_TO_BUILD)
message("Copying LibPack 'bin' directory to build 'bin' directory...")
message("=======================================\n"
"Copying libpack 'bin' directory to build directory.\n")
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.")
message("... done copying libpack 'bin' directory.\n=======================================\n")
endif()
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
message(STATUS "=======================================\n"
@@ -42,9 +31,10 @@ macro(CopyLibpackDirectories)
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(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()
@@ -57,24 +47,10 @@ macro(CopyLibpackDirectories)
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}/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})
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,25 +4,17 @@ 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 --------------------------------
@@ -9,12 +9,11 @@ macro(InitializeFreeCADBuildOptions)
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)
@@ -55,12 +54,9 @@ 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.")
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")
@@ -107,10 +103,9 @@ 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_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_IDF "Build the FreeCAD idf module" ON)
option(BUILD_IMPORT "Build the FreeCAD import module" ON)
option(BUILD_INSPECTION "Build the FreeCAD inspection module" ON)
@@ -122,8 +117,7 @@ macro(InitializeFreeCADBuildOptions)
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_REVERSEENGINEERING "Build the FreeCAD reverse engineering module" ON)
@@ -133,44 +127,27 @@ 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 +165,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
+8 -45
View File
@@ -88,41 +88,11 @@ macro(PrintFinalReport)
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(BUILD_GUI)
value(BUILD_START)
value(BUILD_TECHDRAW)
value(CMAKE_INSTALL_PREFIX)
value(USE_CUDA)
value(USE_OPENCV)
@@ -169,12 +139,14 @@ macro(PrintFinalReport)
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})
if (BUILD_GUI)
conditional(QtWebEngineWidgets BUILD_WEB "not needed (BUILD_WEB is OFF)" ${QtWebEngineWidgets_VERSION})
conditional(DesignerPlugin BUILD_DESIGNER_PLUGIN
"not built (BUILD_DESIGNER_PLUGIN is OFF)"
"[${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}]"
)
else()
simple(QtWebKitWidgets "not needed")
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}]")
@@ -192,16 +164,8 @@ macro(PrintFinalReport)
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")
endif()
if (WIN32)
#simple(SPNAV "not available yet for your OS") # FREECAD_USE_3DCONNEXION instead...
else()
conditional(SPNAV SPNAV_FOUND "not found" "[${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
endif()
@@ -215,7 +179,6 @@ macro(PrintFinalReport)
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()
@@ -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)
+23 -28
View File
@@ -1,5 +1,5 @@
macro(SetupCoin3D)
# -------------------------------- Coin3D --------------------------------
# -------------------------------- Coin3D --------------------------------
if (WIN32 AND MINGW)
find_path(COIN3D_INCLUDE_DIRS Inventor/So.h)
@@ -8,37 +8,32 @@ macro(SetupCoin3D)
# Try MODULE mode
find_package(Coin3D)
if (NOT COIN3D_FOUND)
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 ()
set (COIN3D_INCLUDE_DIRS ${Coin_INCLUDE_DIR})
set (COIN3D_LIBRARIES ${Coin_LIBRARIES})
else()
message(FATAL_ERROR "=================\n"
"Coin3D not found.\n"
"=================\n")
endif()
endif(NOT COIN3D_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 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 ()
IF(NOT PIVY_VERSION)
execute_process (COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')" OUTPUT_VARIABLE PIVY_VERSION)
ENDIF()
endmacro(SetupCoin3D)
@@ -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)
+10 -18
View File
@@ -1,27 +1,28 @@
# -------------------------------- Qt --------------------------------
set(FREECAD_QT_COMPONENTS Core Concurrent Network Xml)
if (FREECAD_QT_MAJOR_VERSION EQUAL 6)
if (FREECAD_QT_MAJOR_VERSION EQUAL 5)
list (APPEND FREECAD_QT_COMPONENTS XmlPatterns)
elseif (FREECAD_QT_MAJOR_VERSION EQUAL 6)
set (Qt6Core_MOC_EXECUTABLE Qt6::moc)
endif()
if(BUILD_GUI)
if (FREECAD_QT_MAJOR_VERSION EQUAL 5)
if (FREECAD_QT_MAJOR_VERSION EQUAL 6)
list (APPEND FREECAD_QT_COMPONENTS GuiTools)
list (APPEND FREECAD_QT_COMPONENTS SvgWidgets)
elseif (FREECAD_QT_MAJOR_VERSION EQUAL 5)
if (WIN32)
list (APPEND FREECAD_QT_COMPONENTS WinExtras)
endif()
elseif (FREECAD_QT_MAJOR_VERSION EQUAL 6)
list (APPEND FREECAD_QT_COMPONENTS GuiTools)
list (APPEND FREECAD_QT_COMPONENTS SvgWidgets)
endif()
list (APPEND FREECAD_QT_COMPONENTS OpenGL PrintSupport Svg UiTools Widgets LinguistTools)
if (BUILD_WEB)
list (APPEND FREECAD_QT_COMPONENTS WebEngineWidgets)
endif()
if(BUILD_DESIGNER_PLUGIN)
list (APPEND FREECAD_QT_COMPONENTS Designer)
endif()
endif()
if (ENABLE_DEVELOPER_TESTS)
list (APPEND FREECAD_QT_COMPONENTS Test)
endif ()
@@ -33,7 +34,6 @@ foreach(COMPONENT IN LISTS FREECAD_QT_COMPONENTS)
set(Qt${COMPONENT}_FOUND ${Qt${FREECAD_QT_MAJOR_VERSION}${COMPONENT}_FOUND})
set(Qt${COMPONENT}_VERSION ${Qt${FREECAD_QT_MAJOR_VERSION}${COMPONENT}_VERSION})
endforeach()
set(CMAKE_AUTOMOC TRUE)
set(CMAKE_AUTOUIC TRUE)
set(QtCore_MOC_EXECUTABLE ${Qt${FREECAD_QT_MAJOR_VERSION}Core_MOC_EXECUTABLE})
@@ -69,16 +69,8 @@ if (Qt${FREECAD_QT_MAJOR_VERSION}Core_VERSION VERSION_LESS 5.15.0)
qt5_add_translation("${_qm_files}" ${ARGN})
set("${_qm_files}" "${${_qm_files}}" PARENT_SCOPE)
endfunction()
# Since Qt 5.15 Q_DISABLE_COPY_MOVE is defined
set (HAVE_Q_DISABLE_COPY_MOVE 0)
else()
# Since Qt 5.15 Q_DISABLE_COPY_MOVE is defined
set (HAVE_Q_DISABLE_COPY_MOVE 1)
endif()
configure_file(${CMAKE_SOURCE_DIR}/src/QtCore.h.cmake ${CMAKE_BINARY_DIR}/src/QtCore.h)
function(qt_find_and_add_translation _qm_files _tr_dir _qm_dir)
file(GLOB _ts_files ${_tr_dir})
set_source_files_properties(${_ts_files} PROPERTIES OUTPUT_LOCATION ${_qm_dir})
+2 -8
View File
@@ -26,13 +26,7 @@ macro(SetupSalomeSMESH)
# check which modules are available
if(UNIX OR WIN32)
# Module names changed between 8 and 9, so do a QUIET find for 9 and its module name first, and fall back
# to v7 minimum with the old component name if it is not found.
find_package(VTK 9 COMPONENTS CommonCore QUIET NO_MODULE)
if(NOT VTK_FOUND)
message(STATUS "Did not find VTK 9, trying for an older version")
find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
endif()
find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
if(${VTK_MAJOR_VERSION} LESS 9)
list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5 vtkFiltersParallelDIY2 vtkRenderingCore vtkInteractionStyle vtkRenderingFreeType vtkRenderingOpenGL2)
foreach(_module ${VTK_COMPONENTS})
@@ -81,7 +75,7 @@ macro(SetupSalomeSMESH)
if(NOT FREECAD_USE_EXTERNAL_SMESH)
find_package(MEDFile REQUIRED)
# See https://www.hdfgroup.org/HDF5/release/cmakebuild.html
if (MSVC)
if (WIN32)
find_package(HDF5 COMPONENTS NO_MODULE REQUIRED static)
else()
find_package(PkgConfig)
@@ -1,9 +1,6 @@
macro(SetupShibokenAndPyside)
# -------------------------------- Shiboken/PySide ------------------------
option(FREECAD_USE_SHIBOKEN "Links to the shiboken library at build time. If OFF its Python module is imported at runtime" ON)
option(FREECAD_USE_PYSIDE "Links to the PySide libraries at build time." ON)
if(DEFINED MACPORTS_PREFIX)
find_package(Shiboken REQUIRED HINTS "${PYTHON_LIBRARY_DIR}/cmake")
find_package(PySide REQUIRED HINTS "${PYTHON_LIBRARY_DIR}/cmake")
@@ -37,10 +34,6 @@ macro(SetupShibokenAndPyside)
message(STATUS "PYTHON_CONFIG_SUFFIX: ${PYTHON_CONFIG_SUFFIX}")
find_package(Shiboken${SHIBOKEN_MAJOR_VERSION} QUIET)
endif()
if(TARGET Shiboken6::libshiboken AND SHIBOKEN_MAJOR_VERSION EQUAL 6)
set_target_properties(Shiboken6::libshiboken PROPERTIES INTERFACE_COMPILE_DEFINITIONS "NDEBUG")
endif()
endif()
# pyside2 changed its cmake files, this is the dance we have
@@ -52,8 +45,9 @@ macro(SetupShibokenAndPyside)
if(NOT SHIBOKEN_INCLUDE_DIR)
find_pip_package(Shiboken${SHIBOKEN_MAJOR_VERSION})
if (Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND)
set(SHIBOKEN_INCLUDE_DIR ${Shiboken${SHIBOKEN_MAJOR_VERSION}_INCLUDE_DIRS})
set(SHIBOKEN_LIBRARY ${Shiboken${SHIBOKEN_MAJOR_VERSION}_LIBRARIES})
set(Shiboken_INCLUDE_DIR ${Shiboken${SHIBOKEN_MAJOR_VERSION}_INCLUDE_DIRS})
set(Shiboken_LIBRARY ${Shiboken${SHIBOKEN_MAJOR_VERSION}_LIBRARIES})
set(Shiboken_FOUND TRUE)
endif()
endif()
@@ -66,8 +60,9 @@ macro(SetupShibokenAndPyside)
if(NOT PYSIDE_INCLUDE_DIR)
find_pip_package(PySide${PYSIDE_MAJOR_VERSION})
if (PySide${PYSIDE_MAJOR_VERSION}_FOUND)
set(PYSIDE_INCLUDE_DIR ${PySide${PYSIDE_MAJOR_VERSION}_INCLUDE_DIRS})
set(PYSIDE_LIBRARY ${PySide${PYSIDE_MAJOR_VERSION}_LIBRARIES})
set(PySide_INCLUDE_DIR ${PySide${PYSIDE_MAJOR_VERSION}_INCLUDE_DIRS})
set(PySide_LIBRARY ${PySide${PYSIDE_MAJOR_VERSION}_LIBRARIES})
set(PySide_FOUND TRUE)
endif()
endif()
@@ -94,13 +89,10 @@ macro(SetupShibokenAndPyside)
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtUiTools.py "from PySide${PYSIDE_MAJOR_VERSION}.QtUiTools import *\n")
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtWidgets.py "from PySide${PYSIDE_MAJOR_VERSION}.QtWidgets import *\n")
if(PYSIDE_MAJOR_VERSION LESS 6)
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtSvgWidgets.py "from PySide${PYSIDE_MAJOR_VERSION}.QtSvg import QGraphicsSvgItem\n"
"from PySide${PYSIDE_MAJOR_VERSION}.QtSvg import QSvgWidget\n")
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtWebEngineWidgets.py "from PySide${PYSIDE_MAJOR_VERSION}.QtWebEngineWidgets import *\n")
else()
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtSvgWidgets.py "from PySide${PYSIDE_MAJOR_VERSION}.QtSvgWidgets import *\n")
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtWebEngineWidgets.py "from PySide${PYSIDE_MAJOR_VERSION}.QtWebEngineWidgets import *\n"
"from PySide${PYSIDE_MAJOR_VERSION}.QtWebEngineCore import QWebEnginePage\n")
"from PySide${PYSIDE_MAJOR_VERSION}.QtWebEngineCore import QWebEnginePage\n")
endif()
endif()
@@ -121,9 +113,11 @@ macro(SetupShibokenAndPyside)
endif()
# If shiboken cannot be found the build option will be set to OFF
if(NOT SHIBOKEN_INCLUDE_DIR)
if(SHIBOKEN_INCLUDE_DIR)
option(FREECAD_USE_SHIBOKEN "Links to the shiboken library at build time. If OFF its Python module is imported at runtime" ON)
else()
message(WARNING "Shiboken${PYSIDE_MAJOR_VERSION} include files not found, FREECAD_USE_SHIBOKEN automatically set to OFF")
set(FREECAD_USE_SHIBOKEN OFF)
option(FREECAD_USE_SHIBOKEN "Links to the shiboken library at build time. If OFF its Python module is imported at runtime" OFF)
endif()
# Now try to import the shiboken Python module and print a warning if it can't be loaded
@@ -147,9 +141,11 @@ macro(SetupShibokenAndPyside)
endif()
# If PySide cannot be found the build option will be set to OFF
if(NOT PYSIDE_INCLUDE_DIR)
if(PYSIDE_INCLUDE_DIR)
option(FREECAD_USE_PYSIDE "Links to the PySide libraries at build time." ON)
else()
message(WARNING "PySide${PYSIDE_MAJOR_VERSION} include files not found, FREECAD_USE_PYSIDE automatically set to OFF")
set(FREECAD_USE_PYSIDE OFF)
option(FREECAD_USE_PYSIDE "Links to the PySide libraries at build time." OFF)
endif()
# Independent of the build option PySide modules must be loaded at runtime. Print a warning if it fails.
@@ -174,6 +170,35 @@ macro(SetupShibokenAndPyside)
endmacro(SetupShibokenAndPyside)
# Locate the include directory for a pip-installed package -- uses pip show to find the base pip
# install directory, and then appends the package name and "/include" to the end
macro(find_pip_package PACKAGE)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -m pip show ${PACKAGE}
RESULT_VARIABLE FAILURE
OUTPUT_VARIABLE PRINT_OUTPUT
)
if(NOT FAILURE)
# Extract Name: and Location: lines and use them to construct the include directory
string(REPLACE "\n" ";" PIP_OUTPUT_LINES ${PRINT_OUTPUT})
foreach(LINE IN LISTS PIP_OUTPUT_LINES)
STRING(FIND "${LINE}" "Name: " NAME_STRING_LOCATION)
STRING(FIND "${LINE}" "Location: " LOCATION_STRING_LOCATION)
if(${NAME_STRING_LOCATION} EQUAL 0)
STRING(SUBSTRING "${LINE}" 6 -1 PIP_PACKAGE_NAME)
elseif(${LOCATION_STRING_LOCATION} EQUAL 0)
STRING(SUBSTRING "${LINE}" 9 -1 PIP_PACKAGE_LOCATION)
endif()
endforeach()
file(TO_NATIVE_PATH "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/include" INCLUDE_DIR)
file(TO_NATIVE_PATH "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/lib" LIBRARY)
set(${PACKAGE}_INCLUDE_DIRS ${INCLUDE_DIR} PARENT_SCOPE)
set(${PACKAGE}_LIBRARIES ${LIBRARY} PARENT_SCOPE)
set(${PACKAGE}_FOUND ${LIBRARY} TRUE)
message(STATUS "Found pip-installed ${PACKAGE} in ${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}")
endif()
endmacro()
# Macros 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:
@@ -229,9 +254,7 @@ MACRO(PYSIDE_WRAP_RC outfiles)
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
COMMAND "${PYSIDE_RCC_EXECUTABLE}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
# The line below sometimes catches unwanted lines too - but there is no date in the file
# anymore with Qt5 RCC, so commenting it out for now...
#COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif()
-55
View File
@@ -268,58 +268,3 @@ MACRO(SET_PYTHON_PREFIX_SUFFIX ProjectName)
set_target_properties(${ProjectName} PROPERTIES SUFFIX ".so")
endif(WIN32)
ENDMACRO(SET_PYTHON_PREFIX_SUFFIX)
# Locate the include directory for a pip-installed package -- uses pip show to find the base pip
# install directory, and then appends the package name and "/include" to the end
macro(find_pip_package PACKAGE)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -m pip show ${PACKAGE}
RESULT_VARIABLE FAILURE
OUTPUT_VARIABLE PRINT_OUTPUT
)
if(NOT FAILURE)
# Extract Name: and Location: lines and use them to construct the include directory
string(REPLACE "\n" ";" PIP_OUTPUT_LINES ${PRINT_OUTPUT})
foreach(LINE IN LISTS PIP_OUTPUT_LINES)
STRING(FIND "${LINE}" "Name: " NAME_STRING_LOCATION)
STRING(FIND "${LINE}" "Location: " LOCATION_STRING_LOCATION)
if(${NAME_STRING_LOCATION} EQUAL 0)
STRING(SUBSTRING "${LINE}" 6 -1 PIP_PACKAGE_NAME)
STRING(STRIP "${PIP_PACKAGE_NAME}" PIP_PACKAGE_NAME)
STRING(REPLACE "-" "_" PIP_PACKAGE_NAME "${PIP_PACKAGE_NAME}")
elseif(${LOCATION_STRING_LOCATION} EQUAL 0)
STRING(SUBSTRING "${LINE}" 9 -1 PIP_PACKAGE_LOCATION)
STRING(STRIP "${PIP_PACKAGE_LOCATION}" PIP_PACKAGE_LOCATION)
endif()
endforeach()
file(TO_CMAKE_PATH "${PIP_PACKAGE_LOCATION}" PIP_PACKAGE_LOCATION)
if(EXISTS "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/include")
set(INCLUDE_DIR "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/include")
endif()
# There are many different library naming schemes, but basically we are looking for things that look like
# PACKAGE*.lib/so or PACKAGE_d*.lib/so
if(WIN32)
file(GLOB OPT_LIBRARIES "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/${PIP_PACKAGE_NAME}.*.lib")
file(GLOB DEBUG_LIBRARIES "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/${PIP_PACKAGE_NAME}_d.*.lib")
else()
string(TOLOWER ${PIP_PACKAGE_NAME} PIP_LIB_NAME)
file(GLOB OPT_LIBRARIES "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/*${PIP_LIB_NAME}*.so.*")
endif()
if (OPT_LIBRARIES AND DEBUG_LIBRARIES)
set(${PACKAGE}_LIBRARIES optimized ${OPT_LIBRARIES} debug ${DEBUG_LIBRARIES} CACHE PATH "")
elseif(OPT_LIBRARIES)
set(${PACKAGE}_LIBRARIES ${OPT_LIBRARIES} CACHE PATH "")
elseif(DEBUG_LIBRARIES)
set(${PACKAGE}_LIBRARIES ${DEBUG_LIBRARIES} CACHE PATH "")
endif()
set(${PACKAGE}_INCLUDE_DIRS ${INCLUDE_DIR} CACHE PATH "")
set(${PACKAGE}_FOUND ON CACHE BOOL OFF)
message(STATUS "Found pip-installed ${PACKAGE} in ${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}")
endif()
endmacro()
function(target_compile_warn_error ProjectName)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
target_compile_options(${ProjectName} PRIVATE -Werror)
endif()
endfunction()
-44
View File
@@ -1,44 +0,0 @@
set(ENV{PATH} "${FREECAD_LIBPACK_DIR};$ENV{PATH}")
list(PREPEND CMAKE_PREFIX_PATH "${FREECAD_LIBPACK_DIR}")
set (Python3_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
# Make sure we are using the shared versions of Boost here: the LibPack includes both
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost COMPONENTS filesystem program_options regex system thread date_time REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
set(OCE_DIR ${FREECAD_LIBPACK_DIR}/lib/cmake CACHE PATH "" FORCE)
set(SWIG_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/swig.exe CACHE FILEPATH "Swig" FORCE)
find_package(Qt6 REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 Qt ${Qt6_VERSION}")
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.1.0")
find_package(pybind11 REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/share/cmake/pybind11 NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 pybind11 ${pybind11_VERSION}")
set(FREECAD_USE_PYBIND11 ON)
endif()
find_package(XercesC REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/cmake NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 XercesC ${XercesC_VERSION}")
find_package(yaml-cpp REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 yaml-cpp ${XercesC_VERSION}")
find_package(Coin REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 Coin ${Coin_VERSION}")
# For compatibility with the rest of the cMake scripts:
set (COIN3D_FOUND TRUE)
set (NETGENDATA ${FREECAD_LIBPACK_DIR}/include/netgen)
if (FREECAD_USE_FREETYPE)
find_package(freetype REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 Freetype ${freetype_VERSION} library from ${freetype_LIBRARY}")
endif (FREECAD_USE_FREETYPE)
set (HDF5_DIR ${FREECAD_LIBPACK_DIR}/share/cmake)
link_directories (${FREECAD_LIBPACK_DIR}/lib)
+1
View File
@@ -39,6 +39,7 @@ set (Qt5UiPlugin_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5UiPlugin CACHE PATH "")
set (Qt5UiTools_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5UiTools CACHE PATH "")
set (Qt5Widgets_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Widgets CACHE PATH "")
set (Qt5Xml_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Xml CACHE PATH "")
set (Qt5XmlPatterns_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5XmlPatterns CACHE PATH "")
find_library(XercesC_LIBRARY_RELEASE xerces-c_3 "${FREECAD_LIBPACK_DIR}/lib")
find_library(XercesC_LIBRARY_DEBUG xerces-c_3D "${FREECAD_LIBPACK_DIR}/lib")
-1
View File
@@ -1 +0,0 @@
mamba run --live-stream -n freecad cmake %*
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
mamba run --live-stream -n freecad cmake $@
-9
View File
@@ -1,9 +0,0 @@
name: freecad
channels:
- conda-forge
dependencies:
- conda-forge/noarch::conda-libmamba-solver==24.7.0
- conda-devenv
- mamba
- python==3.12.*
- zstd
-4
View File
@@ -2,8 +2,4 @@ name: freecad
channels:
- conda-forge
dependencies:
- conda-forge/noarch::conda-libmamba-solver==24.7.0
- conda-devenv
- mamba
- python==3.11.*
- zstd==1.5.6
-100
View File
@@ -1,100 +0,0 @@
name: freecad
channels:
- conda-forge
- conda-forge/label/pivy_rc
dependencies:
- conda-forge/noarch::conda-libmamba-solver==24.7.0
- libspnav # [linux]
- kernel-headers_linux-64 # [linux and x86_64]
- libdrm-cos7-x86_64 # [linux and x86_64]
- libselinux-cos7-x86_64 # [linux and x86_64]
- libsepol-cos7-x86_64 # [linux and x86_64]
- libx11-common-cos7-x86_64 # [linux and x86_64]
- libx11-cos7-x86_64 # [linux and x86_64]
- libxau-cos7-x86_64 # [linux and x86_64]
- libxcb-cos7-x86_64 # [linux and x86_64]
- libxdamage-cos7-x86_64 # [linux and x86_64]
- libxext-cos7-x86_64 # [linux and x86_64]
- libxfixes-cos7-x86_64 # [linux and x86_64]
- libxi-cos7-x86_64 # [linux and x86_64]
- libxi-devel-cos7-x86_64 # [linux and x86_64]
- libxxf86vm-cos7-x86_64 # [linux and x86_64]
- mesa-dri-drivers-cos7-x86_64 # [linux and x86_64]
- mesa-libegl-cos7-x86_64 # [linux and x86_64]
- mesa-libegl-devel-cos7-x86_64 # [linux and x86_64]
- mesa-libgl-cos7-x86_64 # [linux and x86_64]
- mesa-libgl-devel-cos7-x86_64 # [linux and x86_64]
- pixman-cos7-x86_64 # [linux and x86_64]
- sysroot_linux-64 # [linux and x86_64]
- xorg-x11-server-common-cos7-x86_64 # [linux and x86_64]
- xorg-x11-server-xvfb-cos7-x86_64 # [linux and x86_64]
- kernel-headers_linux-aarch64 # [linux and aarch64]
- libdrm-cos7-aarch64 # [linux and aarch64]
- libglvnd-cos7-aarch64 # [linux and aarch64]
- libglvnd-glx-cos7-aarch64 # [linux and aarch64]
- libselinux-cos7-aarch64 # [linux and aarch64]
- libsepol-cos7-aarch64 # [linux and aarch64]
- libx11-common-cos7-aarch64 # [linux and aarch64]
- libx11-cos7-aarch64 # [linux and aarch64]
- libxau-cos7-aarch64 # [linux and aarch64]
- libxcb-cos7-aarch64 # [linux and aarch64]
- libxdamage-cos7-aarch64 # [linux and aarch64]
- libxext-cos7-aarch64 # [linux and aarch64]
- libxfixes-cos7-aarch64 # [linux and aarch64]
- libxi-cos7-aarch64 # [linux and aarch64]
- libxi-devel-cos7-aarch64 # [linux and aarch64]
- libxxf86vm-cos7-aarch64 # [linux and aarch64]
- mesa-dri-drivers-cos7-aarch64 # [linux and aarch64]
- mesa-khr-devel-cos7-aarch64 # [linux and aarch64]
- mesa-libegl-cos7-aarch64 # [linux and aarch64]
- mesa-libegl-devel-cos7-aarch64 # [linux and aarch64]
- mesa-libgbm-cos7-aarch64 # [linux and aarch64]
- mesa-libgl-cos7-aarch64 # [linux and aarch64]
- mesa-libgl-devel-cos7-aarch64 # [linux and aarch64]
- mesa-libglapi-cos7-aarch64 # [linux and aarch64]
- pixman-cos7-aarch64 # [linux and aarch64]
- sysroot_linux-aarch64 # [linux and aarch64]
- xorg-x11-server-common-cos7-aarch64 # [linux and aarch64]
- xorg-x11-server-xvfb-cos7-aarch64 # [linux and aarch64]
- sed # [unix]
- ccache
- cmake
- coin3d
- compilers
- conda
- conda-devenv
- debugpy
- doxygen
- eigen
- fmt
- freetype
- git
- gmsh
- graphviz
- hdf5
- libboost-devel
- libcxx
- mamba
- matplotlib
- ninja
- numpy
- occt
- openssl
- pcl
- pip
- conda-forge/label/pivy_rc::pivy
- pkg-config
- ply
- pre-commit
- pybind11
- pyside6
- python==3.12.*
- pyyaml
- qt6-main
- smesh
- swig
- vtk==9.2.6
- xerces-c
- yaml-cpp
- zlib
- zstd
+68 -73
View File
@@ -2,102 +2,97 @@ name: freecad
channels:
- conda-forge
dependencies:
- conda-forge/noarch::conda-libmamba-solver==24.7.0
- libspnav # [linux]
- kernel-headers_linux-64 # [linux and x86_64]
- libdrm-conda-x86_64 # [linux and x86_64]
- libselinux-conda-x86_64 # [linux and x86_64]
- libsepol-conda-x86_64 # [linux and x86_64]
- libx11-common-conda-x86_64 # [linux and x86_64]
- libx11-conda-x86_64 # [linux and x86_64]
- libxau-conda-x86_64 # [linux and x86_64]
- libxcb-conda-x86_64 # [linux and x86_64]
- libxdamage-conda-x86_64 # [linux and x86_64]
- libxext-conda-x86_64 # [linux and x86_64]
- libxfixes-conda-x86_64 # [linux and x86_64]
- libxi-conda-x86_64 # [linux and x86_64]
- libxi-devel-conda-x86_64 # [linux and x86_64]
- libxxf86vm-conda-x86_64 # [linux and x86_64]
- mesa-dri-drivers-conda-x86_64 # [linux and x86_64]
- mesa-libegl-conda-x86_64 # [linux and x86_64]
- mesa-libegl-devel-conda-x86_64 # [linux and x86_64]
- mesa-libgl-conda-x86_64 # [linux and x86_64]
- mesa-libgl-devel-conda-x86_64 # [linux and x86_64]
- pixman-conda-x86_64 # [linux and x86_64]
- sysroot_linux-64 # [linux and x86_64]
- xorg-x11-server-common-conda-x86_64 # [linux and x86_64]
- xorg-x11-server-xvfb-conda-x86_64 # [linux and x86_64]
- kernel-headers_linux-aarch64 # [linux and aarch64]
- libdrm-conda-aarch64 # [linux and aarch64]
- libglvnd-conda-aarch64 # [linux and aarch64]
- libglvnd-glx-conda-aarch64 # [linux and aarch64]
- libselinux-conda-aarch64 # [linux and aarch64]
- libsepol-conda-aarch64 # [linux and aarch64]
- libx11-common-conda-aarch64 # [linux and aarch64]
- libx11-conda-aarch64 # [linux and aarch64]
- libxau-conda-aarch64 # [linux and aarch64]
- libxcb-conda-aarch64 # [linux and aarch64]
- libxdamage-conda-aarch64 # [linux and aarch64]
- libxext-conda-aarch64 # [linux and aarch64]
- libxfixes-conda-aarch64 # [linux and aarch64]
- libxi-conda-aarch64 # [linux and aarch64]
- libxi-devel-conda-aarch64 # [linux and aarch64]
- libxxf86vm-conda-aarch64 # [linux and aarch64]
- mesa-dri-drivers-conda-aarch64 # [linux and aarch64]
- mesa-khr-devel-conda-aarch64 # [linux and aarch64]
- mesa-libegl-conda-aarch64 # [linux and aarch64]
- mesa-libegl-devel-conda-aarch64 # [linux and aarch64]
- mesa-libgbm-conda-aarch64 # [linux and aarch64]
- mesa-libgl-conda-aarch64 # [linux and aarch64]
- mesa-libgl-devel-conda-aarch64 # [linux and aarch64]
- mesa-libglapi-conda-aarch64 # [linux and aarch64]
- pixman-conda-aarch64 # [linux and aarch64]
- sysroot_linux-aarch64 # [linux and aarch64]
- xorg-x11-server-common-conda-aarch64 # [linux and aarch64]
- xorg-x11-server-xvfb-conda-aarch64 # [linux and aarch64]
- sed # [unix]
- ccache
- kernel-headers_linux-64 # [linux and x86_64]
- libdrm-cos6-x86_64 # [linux and x86_64]
- libselinux-cos6-x86_64 # [linux and x86_64]
- libsepol-cos6-x86_64 # [linux and x86_64]
- libx11-common-cos6-x86_64 # [linux and x86_64]
- libx11-cos6-x86_64 # [linux and x86_64]
- libxau-cos6-x86_64 # [linux and x86_64]
- libxcb-cos6-x86_64 # [linux and x86_64]
- libxdamage-cos6-x86_64 # [linux and x86_64]
- libxext-cos6-x86_64 # [linux and x86_64]
- libxfixes-cos6-x86_64 # [linux and x86_64]
- libxi-cos6-x86_64 # [linux and x86_64]
- libxi-devel-cos6-x86_64 # [linux and x86_64]
- libxxf86vm-cos6-x86_64 # [linux and x86_64]
- mesa-dri-drivers-cos6-x86_64 # [linux and x86_64]
- mesa-dri1-drivers-cos6-x86_64 # [linux and x86_64]
- mesa-libegl-cos6-x86_64 # [linux and x86_64]
- mesa-libegl-devel-cos6-x86_64 # [linux and x86_64]
- mesa-libgl-cos6-x86_64 # [linux and x86_64]
- mesa-libgl-devel-cos6-x86_64 # [linux and x86_64]
- pixman-cos6-x86_64 # [linux and x86_64]
- sysroot_linux-64 # [linux and x86_64]
- xorg-x11-server-common-cos6-x86_64 # [linux and x86_64]
- xorg-x11-server-xvfb-cos6-x86_64 # [linux and x86_64]
- kernel-headers_linux-aarch64 # [linux and aarch64]
- libdrm-cos7-aarch64 # [linux and aarch64]
- libglvnd-cos7-aarch64 # [linux and aarch64]
- libglvnd-glx-cos7-aarch64 # [linux and aarch64]
- libselinux-cos7-aarch64 # [linux and aarch64]
- libsepol-cos7-aarch64 # [linux and aarch64]
- libx11-common-cos7-aarch64 # [linux and aarch64]
- libx11-cos7-aarch64 # [linux and aarch64]
- libxau-cos7-aarch64 # [linux and aarch64]
- libxcb-cos7-aarch64 # [linux and aarch64]
- libxdamage-cos7-aarch64 # [linux and aarch64]
- libxext-cos7-aarch64 # [linux and aarch64]
- libxfixes-cos7-aarch64 # [linux and aarch64]
- libxi-cos7-aarch64 # [linux and aarch64]
- libxi-devel-cos7-aarch64 # [linux and aarch64]
- libxxf86vm-cos7-aarch64 # [linux and aarch64]
- mesa-dri-drivers-cos7-aarch64 # [linux and aarch64]
- mesa-khr-devel-cos7-aarch64 # [linux and aarch64]
- mesa-libegl-cos7-aarch64 # [linux and aarch64]
- mesa-libegl-devel-cos7-aarch64 # [linux and aarch64]
- mesa-libgbm-cos7-aarch64 # [linux and aarch64]
- mesa-libgl-cos7-aarch64 # [linux and aarch64]
- mesa-libgl-devel-cos7-aarch64 # [linux and aarch64]
- mesa-libglapi-cos7-aarch64 # [linux and aarch64]
- pixman-cos7-aarch64 # [linux and aarch64]
- sysroot_linux-aarch64 # [linux and aarch64]
- xorg-x11-server-common-cos7-aarch64 # [linux and aarch64]
- xorg-x11-server-xvfb-cos7-aarch64 # [linux and aarch64]
- sed # [unix]
- boost
- boost-cpp
- cmake
- coin3d
- compilers
- gcc==13.3.* # [linux]
- gxx==13.3.* # [linux]
- clang==18.1.* # [osx]
- clangxx==18.1.* # [osx]
- conda
- conda-build
- conda-devenv
- conda-smithy
- debugpy
- doxygen
- eigen
- fmt
- freetype
- git
- gmsh
- graphviz
- hdf5
- libboost-devel
- libcxx
- mamba
- libcxx<16
- matplotlib
- ninja
- numpy
- occt
- openssl
- occt==7.6.3
- openssl==3.0.*
- pcl
- pip
- pivy
- pkg-config
- ply
- pre-commit
- pybind11
- pyside2
- python==3.11.*
- python
- pyyaml
- qt
- qt-main
- smesh
- qt-webengine
- six
- smesh==9.9
- swig
- vtk==9.2.6
- vtk
- xerces-c
- yaml-cpp
- zlib
- zstd
- pip:
- ptvsd
-12
View File
@@ -1,12 +0,0 @@
#!/bin/sh
# create the conda environment as a subdirectory
mamba env create -p .conda/freecad -f conda/conda-env.yaml
# add the environment subdirectory to the conda configuration
conda config --add envs_dirs $CONDA_PREFIX/envs
conda config --add envs_dirs $(pwd)/.conda
conda config --set env_prompt "({name})"
# install the FreeCAD dependencies into the environment
mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment-qt6.devenv.yml
-10
View File
@@ -1,10 +0,0 @@
:: create the conda environment as a subdirectory
call mamba env create -p .conda/freecad -f conda/conda-env.yaml
:: add the environment subdirectory to the conda configuration
call conda config --add envs_dirs %CONDA_PREFIX%/envs
call conda config --add envs_dirs %CD%/.conda
call conda config --set env_prompt "({name})"
:: install the FreeCAD dependencies into the environment
call mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment.devenv.yml
-12
View File
@@ -1,12 +0,0 @@
#!/bin/sh
# create the conda environment as a subdirectory
mamba env create -p .conda/freecad -f conda/conda-env.yaml
# add the environment subdirectory to the conda configuration
conda config --add envs_dirs $CONDA_PREFIX/envs
conda config --add envs_dirs $(pwd)/.conda
conda config --set env_prompt "({name})"
# install the FreeCAD dependencies into the environment
mamba run --live-stream -n freecad mamba-devenv --no-prune -f conda/environment.devenv.yml
-27
View File
@@ -1,27 +0,0 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"configurationProvider": "ms-vscode.cmake-tools"
},
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**"
],
"configurationProvider": "ms-vscode.cmake-tools"
},
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/include/**"
],
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
-94
View File
@@ -1,94 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug C++ Tests",
"type": "cppdbg",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${command:cmake.buildDirectory}/tests/Tests_run",
"args": [],
"environment": [
{
"name": "PATH",
"value": "${command:cmake.buildDirectory}/tests:${env:PATH}"
}
],
"linux": {
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb"
},
"osx": {
"MIMode": "lldb"
},
"stopAtEntry": false,
"externalConsole": false,
"preLaunchTask": "CMake: build",
"sourceFileMap": {
"${workspaceFolder}": "${workspaceFolder}"
}
},
{
"name": "C/C++ debugger",
"type": "cppdbg",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${command:cmake.buildDirectory}/bin/FreeCAD",
"args": ["${workspaceFolder}/.vscode/scripts/VSCodeAutostartDebug.FCMacro"],
"environment": [
{
"name": "PATH",
"value": "${command:cmake.buildDirectory}/bin:${env:PATH}"
},
{
"name": "PYDEVD_DISABLE_FILE_VALIDATION",
"value": "1"
}
],
"linux": {
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb"
},
"osx": {
"MIMode": "lldb"
},
"stopAtEntry": false,
"externalConsole": false,
"presentation": {
"hidden": true,
}
},
{
"name": "Python debugger",
"type": "python",
"request": "attach",
"preLaunchTask": "WaitForDebugpy",
"redirectOutput": true,
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}/src",
"remoteRoot": "${command:cmake.buildDirectory}"
}
],
"justMyCode": false,
"presentation": {
"hidden": true,
}
}
],
"compounds": [
{
"name": "Debug FreeCAD",
"configurations": ["C/C++ debugger", "Python debugger"],
"preLaunchTask": "CMake: build",
"stopAll": true,
"presentation": {
"order": 1
}
}
]
}
-18
View File
@@ -1,18 +0,0 @@
import debugpy
from multiprocessing.connection import Listener
from freecad.utils import get_python_exe
# get_python_exe is needed because debugpy needs a python interpreter to work.
# It does not have to be FC embedded interpreter.
# By default it attempts to use Freecad's PID mistaking it for python.
# https://github.com/microsoft/debugpy/issues/262
debugpy.configure(python=get_python_exe())
debugpy.listen(('localhost', 5678))
# Turns out you cannot probe debugpy to see if it is up:
# https://github.com/microsoft/debugpy/issues/974
# Open another port that the script WaitForDebugpy can probe to see if
# debugpy is running
listener = Listener(('localhost', 39999), backlog=10)
debugpy.wait_for_client()
-29
View File
@@ -1,29 +0,0 @@
import socket
from contextlib import closing
import time
TIMEOUT_TIME_S = 30
RETRY_DELAY_S = 0.1
MAX_ATTEMPTS = TIMEOUT_TIME_S / RETRY_DELAY_S
def check_socket(host, port):
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
sock.settimeout(RETRY_DELAY_S)
return sock.connect_ex((host, port)) == 0
def main():
# DO NOT CHECK 5678 or debugpy will break
# Check other port manually opened instead
attempt_counter = 0
while (not check_socket('localhost', 39999)) and attempt_counter < MAX_ATTEMPTS:
time.sleep(RETRY_DELAY_S)
attempt_counter += 1
if attempt_counter >= MAX_ATTEMPTS:
exit(1)
else:
exit(0)
if __name__ == "__main__":
main()
-39
View File
@@ -1,39 +0,0 @@
{
// This disables vscode from adding lines to files.associations,
// some files might not be recognized though.
// This is a vscode issue.
"C_Cpp.autoAddFileAssociations": false,
"files.associations": {
"*.c": "c",
"*.h": "cpp",
"*.cpp": "cpp",
"*.hpp": "cpp",
"*.cxx": "cpp",
"*.hxx": "cpp",
"*.py": "python",
"*.FCMacro": "python"
},
"editor.formatOnType": true,
"files.autoSave": "afterDelay",
"debug.onTaskErrors": "abort", //to not launch the python debugger when waitforport.py fails
// Does not quick launch the debugger, forces to select debugger config every time
// Use the debug panel on the left instead
"debug.showInStatusBar": "never",
"cmake.options.advanced": {
"configurePreset": {
"statusBarVisibility": "visible"
},
"build": {
"statusBarVisibility": "visible"
},
"launch": {
"statusBarVisibility": "hidden"
},
"debug": {
"statusBarVisibility": "hidden"
}
}
}
-71
View File
@@ -1,71 +0,0 @@
{
"tasks": [
{
"type": "process",
"label": "FreeCAD: setup conda environment",
"linux": {
"command": "conda/setup-environment.sh",
},
"osx": {
"command": "conda/setup-environment.sh",
},
"windows": {
"command": "conda/setup-environment.cmd",
},
"group": "none",
"problemMatcher": [],
},
{
"label": "WaitForDebugpy",
"type": "shell",
"command": "python ${workspaceFolder}/.vscode/scripts/WaitForDebugpy.py",
"group": "none",
"problemMatcher": [],
"presentation": {
"reveal": "never", //silently fail and don't launch the debugger
"panel": "dedicated",
"close": true,
"revealProblems": "never"
},
"hide": true
},
{
"type": "cmake",
"label": "CMake: build",
"command": "build",
"preset": "${command:cmake.activeBuildPresetName}",
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Build all targets",
"dependsOn": [],
"problemMatcher": ["$gcc"]
},
{
"label": "Tests: run c++ tests",
"detail": "Run googletest",
"type": "shell",
"command": "${command:cmake.buildDirectory}/tests/Tests_run",
"group": {
"kind": "test",
"isDefault": true
},
"dependsOn": ["CMake: build"],
"problemMatcher": []
},
{
"label": "Tests: run python tests",
"detail": "Run FreeCAD integrated tests",
"type": "shell",
"command": "${command:cmake.buildDirectory}/bin/FreeCAD",
"args": ["-t", "0"],
"group": {
"kind": "test"
},
"dependsOn": ["CMake: build"],
"problemMatcher": []
}
],
"version": "2.0.0"
}
Binary file not shown.
Binary file not shown.

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