Compare commits
95 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 140236c774 | |||
| cc3d7dfbf0 | |||
| 112c15ed75 | |||
| a08b04a079 | |||
| 811bf87d0e | |||
| 93c3ef7b2f | |||
| ad94f88217 | |||
| c2f7d03413 | |||
| f2b2c8b4e7 | |||
| f9688fbde7 | |||
| 51621458b5 | |||
| c25ed7e162 | |||
| 2a4335302f | |||
| 69ed88ac2c | |||
| 1f946e6c9a | |||
| ac76ba280d | |||
| ceab748ba1 | |||
| e1232a5e6e | |||
| 5cc0693e61 | |||
| 387b19eed9 | |||
| 18ff9bcf26 | |||
| 5da8804871 | |||
| dbeb4d2f5d | |||
| d2d0b7f018 | |||
| c28d5659a0 | |||
| 812c1e0f56 | |||
| 99f719e81c | |||
| da58eb2681 | |||
| c084eef7a3 | |||
| 24036a8046 | |||
| db8729ec74 | |||
| 015d6396ff | |||
| 6df100f5b7 | |||
| 7cb9ba470c | |||
| 1e6f84a59c | |||
| 2292eecb4e | |||
| 5fc5203ff7 | |||
| e8547f7588 | |||
| eade03c006 | |||
| cef5e6f4ab | |||
| 9331c0d939 | |||
| decc354b80 | |||
| f24c64c96c | |||
| 689f6595fb | |||
| 3a2e799300 | |||
| c643e5e340 | |||
| 8ee6153f4b | |||
| bf38d42f15 | |||
| 6fa8bba4fd | |||
| 33c85ba1f2 | |||
| 9f200d4404 | |||
| 50f6650fac | |||
| 5db5fc3886 | |||
| 28ca0cf7b1 | |||
| b470cfeaf1 | |||
| 352678f4e2 | |||
| f87ed0c454 | |||
| c42a4cb21c | |||
| f638619964 | |||
| 8dc3b71989 | |||
| 4984bd9f05 | |||
| 27c893f71f | |||
| 6c51bebf14 | |||
| 32d45ac97d | |||
| a46cc55da1 | |||
| d11bec9688 | |||
| 0069419c8b | |||
| b06c0ccd86 | |||
| c85023415a | |||
| db858e1f0a | |||
| 010a632e5d | |||
| 9d7793ecb9 | |||
| 418ebb7958 | |||
| e30f7bf920 | |||
| 1b26292d3c | |||
| 0afcf099df | |||
| 691c0709be | |||
| 05d35e1e6f | |||
| 1edab5611b | |||
| e5beb5ab2b | |||
| c67d9b0ee9 | |||
| 6ce250ddf8 | |||
| 75acf045a6 | |||
| 2a254e937f | |||
| 444de2c8af | |||
| fd60f29965 | |||
| 217c8630f6 | |||
| dc48c5debd | |||
| a8606ce05c | |||
| adbe29f1dc | |||
| 3b09334501 | |||
| e909322fb9 | |||
| a304bcc59a | |||
| 83d0fa6730 | |||
| 9d54041102 |
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"phabricator.uri" : "http://pha.geofinder.eu/"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/test
|
||||
machine: true
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
command: docker pull condaforge/linux-anvil
|
||||
- run:
|
||||
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions.
|
||||
command: ./package/conda/run_docker_build.sh
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_test:
|
||||
jobs:
|
||||
- build
|
||||
@@ -5,22 +5,20 @@ AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignOperands: DontAlign
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortBlocksOnASingleLine: Always
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Empty
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterStruct: true
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
@@ -33,7 +31,7 @@ BraceWrapping:
|
||||
SplitEmptyRecord: true
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
ColumnLimit: 100
|
||||
CompactNamespaces: false
|
||||
@@ -41,16 +39,13 @@ ContinuationIndentWidth: 4
|
||||
IndentCaseLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 4
|
||||
InsertBraces: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: None
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PackConstructorInitializers: Never
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: Never
|
||||
ReflowComments: false
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
@@ -61,7 +56,7 @@ SpaceBeforeInheritanceColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpacesBeforeTrailingComments: 0
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
---
|
||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,
|
||||
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,google-explicit-constructor,
|
||||
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'
|
||||
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,
|
||||
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
@@ -155,7 +151,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
|
||||
|
||||
@@ -56,49 +56,3 @@ b13088664fea77e6ac4779dddfdea7aac3c50b30
|
||||
bedf9207023d6d594f2c03d2a8d799b34759a8fb
|
||||
132a1d7e55eadd0cb5a09760d471780eb5bd9340
|
||||
3ef438eaf03f840958a2f7a9ec585a3d2728e447
|
||||
c726b69d7ede5b1af82407c515e14375f3358be3
|
||||
390e09db3258e4807a3d4b2993c1723480ae5350
|
||||
57d0c2000ae29d3160e0aa908ed1e027b321e36a
|
||||
b389f6e602eb42c07c21f37fbcd451e28dd9fbc4
|
||||
48365a1df5286c7a5608cd3a5cce0def5e4d5380
|
||||
dc5b3cb495002951c3a36c928c55108b0999bc3e
|
||||
875f9eaad6a59abd70775c0b67a7f10d92128a5a
|
||||
7a8a453746a8e4a845219948591fd17f4494a067
|
||||
8b31d7deb09077bc0cce0ecf6de02c94db262a67
|
||||
4a7e1b6d9b12df211cf6fbec61cc8544e4c6bf9d
|
||||
129d5882a729327a72b57ec695bb376e84205bd0
|
||||
2ae7cc4a94c1ab1dfc0264367c5da4716ea02bfe
|
||||
987b4bda2ac8570969dc07fa887bda420f77e441
|
||||
ec899d75c6abf45d7ee4dd91ea0f8141a9818446
|
||||
233a337ca5d693e4773fecf1de14325752afd658
|
||||
9271b6d433578f65df9b469131ece4e4bdbb19aa
|
||||
2637527e3a4e132506e8c074b752721d66ae146a
|
||||
7681c62468d7b6f4d8af6758324b9ec983340b97 # Test: apply clang format
|
||||
4919fa18ff7f9a4cdfdd7896d768c2342e5f9f37 # Surface: apply clang format
|
||||
791fe029341aa1dda42376620d52c67ecaca7eea # Sketcher: Reformat to current clang-format standard
|
||||
0a8292a850b98d2e66e08e235dfb81b6e7285df1 # Web: apply clang format
|
||||
1a960286a4a549a6454155481ce51cad88a51745 # Tests: Reformat to current clang-format standard
|
||||
c1825036a6dfd44576da6157bde9fa2fab724d55 # Tools: Reformat to current clang-format standard
|
||||
17bf44ec9a5fd7a8f1c7bf0d3c24d63b6c808dbd # Start: apply clang format
|
||||
89579cff6e8834e296d5efe6292f019fadedce53 # Addon Manager: Reformat with new Black line length
|
||||
c989a8506ecc26e3172c0d18ce4d0f710b5c7d92 # RE: apply clang format
|
||||
c6bc17ffc13aee4d38d2938800ef5002fc874fc3 # RE: apply clang format
|
||||
6fb2bcafe85eb6bb0c625f37f233b0b09e093963 # MeshPart: apply clang format
|
||||
c2bda2f75684ed8bb64813d4a92a5a595181f556 # MeshPart: apply clang format
|
||||
ea116dc0332ccfc5797f248b04492a16f421b787 # Inspection: apply clang format
|
||||
8d24f0c021a04f19f5463a52e3be1af60fb892f1 # Points: apply clang-formatting
|
||||
e3de4f217c4f028523adcb5cb566f4d6a7957abe # minor reformat: break lines, one per item
|
||||
d57d14321b408beef7b115331e2cfa7215f59b8a # Web: Final application of pre-commit
|
||||
efd11e590d28d72e350b72f02f3f599ef4f704f4 # Test: Final application of pre-commit
|
||||
217674de04533afb81da0968483dd5a6c4d88667 # Surface: Final application of pre-commit
|
||||
70e046bbd5a7214b5d5ae8f12da5aed502dc89ab # Start: Final application of pre-commit
|
||||
db24eeec535f1f43fb3d5b63d24c5171af637880 # RE: Final application of pre-commit
|
||||
714cb0a309e243cfb035b046dd8cc543ac514cd2 # Points: Final application of pre-commit
|
||||
7593f0c112198a0cf033a0bcf8d55db4e0a0e3f5 # MeshPart: Final application of pre-commit
|
||||
b8f8b232cb0882d171cb299e6f6279a516cdd6eb # Inspection: Final application of pre-commit
|
||||
c5c2ea3498f402c0c89916c46ddb071e22756622 # Assembly: Final application of pre-commit
|
||||
592c992b863549fde52741fd8830418168387695 # Assembly: Apply pre-commit to Assembly files
|
||||
94ca51b7799b2ac60a2a56d7e6e753bb97a73671 # PartDesign: Fix #9377 - issue with accuracy in AdditiveHelix (#11312)
|
||||
d472927bba7b2d8d151c99fb29cf1d8dd099ea7d # Correct PartDesign Helix feature negative angles (#11399)
|
||||
b93c02e07da4990482b9d927506901e6f5d624e1 # Black updated to 24.3.0
|
||||
cbea6b60942f8327e6105b12e8c1d5db4647984c # FEM: Apply pre-commit to FEM files
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#git archive --worktree-attributes --prefix=freecad-0.13/ --output=freecad.tar.gz HEAD
|
||||
acinclude.m4 export-ignore
|
||||
autogen.sh export-ignore
|
||||
build.sh export-ignore
|
||||
BuildAll.bat export-ignore
|
||||
BuildRelease.ini export-ignore
|
||||
BuildRelease.py export-ignore
|
||||
configure.ac export-ignore
|
||||
Makefile.am export-ignore
|
||||
mkinstalldirs export-ignore
|
||||
package export-ignore
|
||||
fc.sh export-ignore
|
||||
UpdateResources.bat export-ignore
|
||||
BuildVersion.bat export-ignore
|
||||
*.sln export-ignore
|
||||
WindowsInstaller export-ignore
|
||||
JtReader export-ignore
|
||||
mefisto.patch export-ignore
|
||||
Version.h.in export-subst
|
||||
|
||||
@@ -9,4 +9,4 @@ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ["https://wiki.freecad.org/Donate"]
|
||||
custom: ["https://wiki.freecadweb.org/Donate"]
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
name: Request a Backport
|
||||
description: Suggest that a commit from the main development branch be backported to the next point release
|
||||
title: "[Backport] "
|
||||
labels: ["needs triage", "backport"]
|
||||
body:
|
||||
- type: input
|
||||
id: pull_request
|
||||
attributes:
|
||||
label: Original PR
|
||||
description: A link to the PR that contains the commits to be backported
|
||||
placeholder: https://github.com/FreeCAD/FreeCAD/pulls/1234
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description and Justification
|
||||
description: Why should this PR (or individual commit) be backported?
|
||||
placeholder: Please explain why this PR or commit should be backported to the next point release.
|
||||
@@ -0,0 +1,93 @@
|
||||
name: 🐛 Report a Bug
|
||||
description: File a bug report
|
||||
title: "[Bug] <title>"
|
||||
labels: ["🐛 bug", "needs triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to file a bug report! Please make sure you've posted about your issue in the FreeCAD Forums before submitting here.
|
||||
- type: checkboxes
|
||||
id: existing_issue
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: input
|
||||
id: forum_link
|
||||
attributes:
|
||||
label: Forums discussion
|
||||
description: |
|
||||
Please start a discussion about your issue at [the FreeCAD Forum](https://forum.freecad.org) and wait for confirmation there before creating an issue.
|
||||
**Note:** Bug reports without a prior forum discussion will most likely not be accepted.
|
||||
placeholder: Paste link to forum discussion here
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What version of FreeCAD are you running?
|
||||
options:
|
||||
- 0.20 (Release)
|
||||
- 0.21 (Development)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: full_version
|
||||
attributes:
|
||||
label: Full version info
|
||||
description: Please use the About FreeCAD dialog to copy your full version information and paste it here.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: wb
|
||||
attributes:
|
||||
label: Subproject(s) affected?
|
||||
options:
|
||||
- Addon Manager
|
||||
- Arch
|
||||
- Core
|
||||
- Draft
|
||||
- Expressions
|
||||
- FEM
|
||||
- File formats
|
||||
- GCS
|
||||
- OpenSCAD
|
||||
- Part
|
||||
- PartDesign
|
||||
- Path
|
||||
- Project Tools & Websites
|
||||
- Sketcher
|
||||
- Spreadsheet
|
||||
- Techdraw
|
||||
- Other (specify in description)
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Issue description
|
||||
description: Please include as much detail as possible so that testers can reproduce the bug
|
||||
placeholder: Description of the problem
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything_else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? References? Anything that will give us more context about the issue you are encountering!
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/master/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
@@ -0,0 +1,73 @@
|
||||
name: 🌱 Feature Request
|
||||
description: Submit an idea for a new feature
|
||||
title: "[Feature Request] <title>"
|
||||
labels: ["feature", "needs triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to request a feature! Please make sure you've posted about your idea in the FreeCAD Forums before submitting here.
|
||||
- type: checkboxes
|
||||
id: existing_issue
|
||||
attributes:
|
||||
label: Is there an existing request for this?
|
||||
description: Please search to see if a request already exists for your suggestion
|
||||
options:
|
||||
- label: I have searched the existing requests
|
||||
required: true
|
||||
- type: input
|
||||
id: forum_link
|
||||
attributes:
|
||||
label: Forums discussion
|
||||
description: Please start a discussion about your idea at [the FreeCAD Forum](https://forum.freecad.org) and wait for confirmation there before creating a request.
|
||||
placeholder: Paste link to forum discussion here
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: wb
|
||||
attributes:
|
||||
label: Subproject(s) affected?
|
||||
options:
|
||||
- Addon Manager
|
||||
- Arch
|
||||
- Core
|
||||
- Draft
|
||||
- Expressions
|
||||
- FEM
|
||||
- File formats
|
||||
- GCS
|
||||
- OpenSCAD
|
||||
- Part
|
||||
- PartDesign
|
||||
- Path
|
||||
- Project Tools & Websites
|
||||
- Sketcher
|
||||
- Spreadsheet
|
||||
- Techdraw
|
||||
- Other (specify in description)
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Idea description
|
||||
description: Please include as much detail as possible so that developers understand the request
|
||||
placeholder: Description of the feature
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything_else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? References? Anything that will give us more context about your idea.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/master/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
@@ -1,71 +0,0 @@
|
||||
name: Report a Problem
|
||||
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
|
||||
labels: ["Status: Needs triage"]
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: existing_issue
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please [search](https://github.com/FreeCAD/FreeCAD/issues) to see if a similar issue already exists for the problem you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Problem description
|
||||
description: Describe the problem and how it impacts user experience, workflow, maintainability or speed of the code. If the problem appears to be a bug with the current functionality, provide as test case or recipe that reproduces the error. Ideally record a macro and attach it.
|
||||
placeholder: Description of the problem
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: full_version
|
||||
attributes:
|
||||
label: Full version info
|
||||
description: Please use the About FreeCAD dialog to copy your full version information and paste it here.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: wb
|
||||
attributes:
|
||||
label: Subproject(s) affected?
|
||||
options:
|
||||
- Addon Manager
|
||||
- Assembly
|
||||
- BIM
|
||||
- CAM
|
||||
- Core
|
||||
- Draft
|
||||
- Expressions
|
||||
- FEM
|
||||
- File formats
|
||||
- Mesh
|
||||
- OpenSCAD
|
||||
- Part
|
||||
- PartDesign
|
||||
- Project Tools & Websites
|
||||
- Sketcher
|
||||
- Spreadsheet
|
||||
- TechDraw
|
||||
- Other (specify in description)
|
||||
- type: textarea
|
||||
id: anything_else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? References? Anything that will give us more context about the issue you are encountering!
|
||||
If there is a discussion about the problem on the forum, provide link(s) here.
|
||||
You can upload or copy your macro here to speed up the diagnosis and debugging.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
@@ -2,4 +2,4 @@ blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 💬 START HERE -- FreeCAD Forum
|
||||
url: https://forum.freecad.org/
|
||||
about: You are encouraged to discuss the problem you are seeing on the FreeCAD Forums before opening an issue on GitHub
|
||||
about: Please start a topic at the forums first and wait for others to confirm your issue before creating a bug report on GitHub
|
||||
@@ -0,0 +1,14 @@
|
||||
Thank you for creating a pull request to contribute to FreeCAD! To ease integration, we ask you to conform to the following items. Pull requests which don't satisfy all the items below might be rejected. If you are in doubt with any of the items below, don't hesitate to ask for help in the [FreeCAD forum](https://forum.freecadweb.org/viewforum.php?f=10)!
|
||||
|
||||
- [ ] Your pull request is confined strictly to a single module. That is, all the files changed by your pull request are either in `App`, `Base`, `Gui` or one of the `Mod` subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next ones
|
||||
- [ ] In case your pull request does more than just fixing small bugs, make sure you discussed your ideas with other developers on the FreeCAD forum
|
||||
- [ ] Your branch is [rebased](https://git-scm.com/docs/git-rebase) on latest master `git pull --rebase upstream master`
|
||||
- [ ] All FreeCAD unit tests are confirmed to pass by running `./bin/FreeCAD --run-test 0`
|
||||
- [ ] All commit messages are [well-written](https://chris.beams.io/posts/git-commit/) ex: `Fixes typo in Draft Move command text`
|
||||
- [ ] Your pull request is well written and has a good description, and its title starts with the module name, ex: `Draft: Fixed typos`
|
||||
- [ ] Commit messages include `issue #<id>` or `fixes #<id>` where `<id>` is the issue ID number from our [Issues database](https://github.com/FreeCAD/FreeCAD/issues) in case a particular commit solves or is related to an existing issue. Ex: `Draft: fix typos - fixes #4805`
|
||||
|
||||
And please remember to update the Wiki with the features added or changed once this PR is merged.
|
||||
**Note**: If you don't have wiki access, then please mention your contribution on the [1.0 Changelog Forum Thread](https://forum.freecad.org/viewtopic.php?f=10&t=69438).
|
||||
|
||||
---
|
||||
@@ -7,7 +7,6 @@ alocation
|
||||
anid
|
||||
anormal
|
||||
apoints
|
||||
aply
|
||||
appy
|
||||
ba
|
||||
beginn
|
||||
@@ -33,7 +32,6 @@ froms
|
||||
hist
|
||||
indicies
|
||||
inout
|
||||
isnt
|
||||
ist
|
||||
itsel
|
||||
lod
|
||||
@@ -72,6 +70,5 @@ uptodate
|
||||
usind
|
||||
vas
|
||||
vertexes
|
||||
vew
|
||||
wallthickness
|
||||
zuser
|
||||
|
Before Width: | Height: | Size: 431 KiB |
|
Before Width: | Height: | Size: 416 KiB |
|
Before Width: | Height: | Size: 540 KiB |
|
Before Width: | Height: | Size: 570 KiB |
|
Before Width: | Height: | Size: 464 KiB |
|
Before Width: | Height: | Size: 459 KiB |
|
Before Width: | Height: | Size: 457 KiB |
@@ -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/**/*']
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This workflow is a complementary one to the master CI.
|
||||
# It aims at doing cleanup operations after a CI workflow ran.
|
||||
# Being triggered when the master workflow ends allows it to run with necessary privileges.
|
||||
# Indeed it always run with push-like rights even for PR events.
|
||||
|
||||
# In order to work, this cleanup workflow imposes name formatting for caches
|
||||
# Caches that have to be cleaned (typically compiler caches) shall be named as below :
|
||||
# ${MARK}-${CONTEXT}-${REF}-${ID}
|
||||
# with :
|
||||
# ${MARK} => A mark identifying a cache to be cleaned, defined as being "FC" (without quotes)
|
||||
# ${CONTEXT} => A string identifying cache saving context, typically OS name or compiler name
|
||||
# ${REF} => The full reference of the branch owning the cache (starting with "/refs/pull/" or "/refs/heads/")
|
||||
# ${ID} => A cache unique identifier, generally an ascending number, in no case containing a '-' (hyphen) sign
|
||||
|
||||
name: FreeCAD CI cleaner
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [FreeCAD master CI]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
dryrun: false
|
||||
|
||||
concurrency:
|
||||
group: FC-CI-cleaner
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
|
||||
CachesCleanup:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
logdir: /tmp/log/
|
||||
steps:
|
||||
- name: Make needed directories
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
- name: Get existing caches for the repo
|
||||
run: |
|
||||
curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches > ${{ env.logdir }}caches.json
|
||||
- name: Extract pull request caches
|
||||
run: |
|
||||
# Extract caches of which names starts with MARK and contains "/refs/pull/"
|
||||
jq ".actions_caches | map(select(.key | startswith(\"FC-\"))) | map(select(.key | contains(\"refs/pull/\")))" ${{ env.logdir }}caches.json > ${{ env.logdir }}pulls.json
|
||||
- name: Extract and delete pull request obsolete cache IDs
|
||||
run: |
|
||||
# Group the caches by MARK-CONTEXT-REF, sort by ascending last access datetime and keep all but the last as to be deleted
|
||||
# As a consequence, for pull requests, only the most recent cache is kept (one for each context and for each PR)
|
||||
PRID=$(jq "group_by(.key | .[:rindex(\"-\")]) | .[] | sort_by(.last_accessed_at) | .[:-1][].id" ${{ env.logdir }}pulls.json)
|
||||
for id in $PRID
|
||||
do
|
||||
echo "Trying to delete pull request obsolete cache ID : $id"
|
||||
if [ ${{ env.dryrun }} == "false" ]
|
||||
then
|
||||
curl -X DELETE -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id
|
||||
else
|
||||
echo "DRYRUN: executing : curl -X DELETE -H \"Accept: application/vnd.github+json\" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id"
|
||||
fi
|
||||
done
|
||||
- name: Extract push caches
|
||||
run: |
|
||||
# Extract caches of which names starts with MARK and contains "/refs/heads/"
|
||||
jq ".actions_caches | map(select(.key | startswith(\"FC-\"))) | map(select(.key | contains(\"refs/heads/\")))" ${{ env.logdir }}caches.json > ${{ env.logdir }}pushes.json
|
||||
- name: Extract and delete push obsolete cache IDs
|
||||
run: |
|
||||
# Group the caches by MARK-CONTEXT-REF, sort by ascending last access datetime, keep all but the last 2 and keep all accessed for more than 1 hour as to be deleted
|
||||
# As a consequence, for pushes (repo branches), at least 2 caches (for each context and for each branch) are kept, others are deleted if they have been useless for more than 1 hour
|
||||
PSID=$(jq "group_by(.key | .[:rindex(\"-\")]) | .[] | sort_by(.last_accessed_at) | .[:-2][] | select((.last_accessed_at | if contains(\".\") then .[:rindex(\".\")]+\"Z\" else . end | fromdateiso8601) < (now | floor - 3600)) | .id" ${{ env.logdir }}pushes.json)
|
||||
for id in $PSID
|
||||
do
|
||||
echo "Trying to delete push obsolete cache ID : $id"
|
||||
if [ ${{ env.dryrun }} == "false" ]
|
||||
then
|
||||
curl -X DELETE -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id
|
||||
else
|
||||
echo "DRYRUN: executing : curl -X DELETE -H \"Accept: application/vnd.github+json\" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id"
|
||||
fi
|
||||
done
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
@@ -1,108 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the master workflow for CI of FreeCAD.
|
||||
# It (only) aims at properly organizing the sub-workflows.
|
||||
|
||||
name: FreeCAD master CI
|
||||
|
||||
on: [workflow_dispatch, push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: FC-CI-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
Prepare:
|
||||
uses: ./.github/workflows/sub_prepare.yml
|
||||
with:
|
||||
artifactBasename: Prepare-${{ github.run_id }}
|
||||
|
||||
MacOS_13_Conda_Apple:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildMacOSCondaApple.yml
|
||||
with:
|
||||
artifactBasename: MacOS_13_Conda_Apple-${{ github.run_id }}
|
||||
|
||||
# MacOS_13_Conda_Intel:
|
||||
# needs: [Prepare]
|
||||
# uses: ./.github/workflows/sub_buildMacOSCondaIntel.yml
|
||||
# with:
|
||||
# artifactBasename: MacOS_13_Conda_Intel-${{ github.run_id }}
|
||||
|
||||
Ubuntu_20-04:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2004.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_20-04-${{ github.run_id }}
|
||||
|
||||
Ubuntu_22-04_Conda:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2204Conda.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_22-04_Conda-${{ github.run_id }}
|
||||
|
||||
Ubuntu_22-04_Conda_Qt6:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2204CondaQt6.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_22-04_Conda-Qt6-${{ github.run_id }}
|
||||
|
||||
Windows:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildWindows.yml
|
||||
with:
|
||||
artifactBasename: Windows-${{ github.run_id }}
|
||||
|
||||
## Disable until the following issue is resolved: https://github.com/mamba-org/mamba/issues/3292
|
||||
# Windows_Conda:
|
||||
# needs: [Prepare]
|
||||
# uses: ./.github/workflows/sub_buildWindowsConda.yml
|
||||
# with:
|
||||
# artifactBasename: Windows_Conda-${{ github.run_id }}
|
||||
|
||||
Lint:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_lint.yml
|
||||
with:
|
||||
artifactBasename: Lint-${{ github.run_id }}
|
||||
changedFiles: ${{ needs.Prepare.outputs.changedFiles }}
|
||||
changedCppFiles: ${{ needs.Prepare.outputs.changedCppFiles }}
|
||||
changedPythonFiles: ${{ needs.Prepare.outputs.changedPythonFiles }}
|
||||
|
||||
WrapUp:
|
||||
needs: [
|
||||
Prepare,
|
||||
MacOS_13_Conda_Apple,
|
||||
# MacOS_13_Conda_Intel,
|
||||
Ubuntu_20-04,
|
||||
Ubuntu_22-04_Conda,
|
||||
Windows,
|
||||
# Windows_Conda,
|
||||
Lint
|
||||
]
|
||||
if: always()
|
||||
uses: ./.github/workflows/sub_wrapup.yml
|
||||
with:
|
||||
previousSteps: ${{ toJSON(needs) }}
|
||||
@@ -1,74 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: build
|
||||
description: "Linux: build application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake build"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build
|
||||
id: build
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
(stdbuf -oL -eL cmake --build ${{ inputs.builddir }} -j$(nproc) ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.build.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake build succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake build failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Build Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,79 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: configure
|
||||
description: "Linux: configure CMake"
|
||||
|
||||
inputs:
|
||||
sourcedir:
|
||||
description: "Directory where sources are stored"
|
||||
required: false
|
||||
default: ./
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake configure"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure CMake
|
||||
id: configure
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
(stdbuf -oL -eL cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.configure.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake configure succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake configure failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,47 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: generateCacheKey
|
||||
description: "Linux: generates a cache key taking into account distro and compiler"
|
||||
|
||||
inputs:
|
||||
compiler:
|
||||
description: "Binary name/path of compiler to be used"
|
||||
required: true
|
||||
qt_major_version:
|
||||
description: "Major version number of qt to be used"
|
||||
required: true
|
||||
outputs:
|
||||
cacheKey:
|
||||
description: "Cache key with distro and compiler version"
|
||||
value: ${{ steps.generateCacheKey.outputs.cacheKey }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: generateCacheKey
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cacheKey=$(lsb_release -ds | tr -d ' ')-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)-qt${{ inputs.qt_major_version }}
|
||||
echo "Generated cache key : $cacheKey"
|
||||
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
|
||||
@@ -1,74 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: install
|
||||
description: "Linux: install application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build is stored"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake install"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install
|
||||
id: install
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
(stdbuf -oL -eL sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.install.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake install succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake install failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stdout output trimmed to the last 100 Lines):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
tail -n 100 ${{ inputs.logFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,73 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: build
|
||||
description: "macOS: build application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake build"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build
|
||||
id: build
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
(cmake --build ${{ inputs.builddir }} -j$(nproc) ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.build.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake build succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake build failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Build Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,78 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: configure
|
||||
description: "macOS: configure CMake"
|
||||
|
||||
inputs:
|
||||
sourcedir:
|
||||
description: "Directory where sources are stored"
|
||||
required: false
|
||||
default: ./
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake configure"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure CMake
|
||||
id: configure
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
(cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.configure.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake configure succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake configure failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,44 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: generateCacheKey
|
||||
description: "macOS: generates a cache key taking into account distro and compiler"
|
||||
|
||||
inputs:
|
||||
compiler:
|
||||
description: "Binary name/path of compiler to be used"
|
||||
required: true
|
||||
outputs:
|
||||
cacheKey:
|
||||
description: "Cache key with distro and compiler version"
|
||||
value: ${{ steps.generateCacheKey.outputs.cacheKey }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: generateCacheKey
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cacheKey=$(sw_vers --productName)-$(sw_vers --productVersion)-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)
|
||||
echo "Generated cache key : $cacheKey"
|
||||
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
|
||||
@@ -1,73 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: install
|
||||
description: "macOS: install application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build is stored"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake install"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install
|
||||
id: install
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
(sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.install.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake install succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake install failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stdout output trimmed to the last 100 Lines):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
tail -n 100 ${{ inputs.logFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,113 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 The FreeCAD Project Association *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# !!! Each step running a single test shall have an'id' defined so its report will be output
|
||||
|
||||
name: Run all C++ Tests
|
||||
description: "Run all C++ tests, generating logs and reports for each"
|
||||
|
||||
inputs:
|
||||
reportdir:
|
||||
description: "Report directory where logs will be stored"
|
||||
required: true
|
||||
builddir:
|
||||
description: "Build directory where tests are located"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: C++ core tests
|
||||
id: core
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Tests_run --gtest_output=json:${{ inputs.reportdir }}core_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}core_gtest_test_log.txt
|
||||
testName: Core
|
||||
- name: C++ Material tests
|
||||
id: material
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Material_tests_run --gtest_output=json:${{ inputs.reportdir }}material_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}material_gtest_test_log.txt
|
||||
testName: Material
|
||||
- name: C++ 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++ Part tests
|
||||
id: part
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Part_tests_run --gtest_output=json:${{ inputs.reportdir }}part_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}Part_gtest_test_log.txt
|
||||
testName: Part
|
||||
- name: C++ PartDesign tests
|
||||
id: partdesign
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/PartDesign_tests_run --gtest_output=json:${{ inputs.reportdir }}partdesign_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}PartDesign_gtest_test_log.txt
|
||||
testName: PartDesign
|
||||
- name: C++ Points tests
|
||||
id: points
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Points_tests_run --gtest_output=json:${{ inputs.reportdir }}points_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}points_gtest_test_log.txt
|
||||
testName: Points
|
||||
- name: C++ Sketcher tests
|
||||
id: sketcher
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}sketcher_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}sketcher_gtest_test_log.txt
|
||||
testName: Sketcher
|
||||
- name: Compose summary report based on test results
|
||||
if: always()
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
# Print global result
|
||||
if [ ${{ job.status }} != "success" ]
|
||||
then
|
||||
echo "<details><summary>:fire: C++ tests failed</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: C++ tests succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "<blockquote>" >> ${{ inputs.reportFile }}
|
||||
#Extract individual results
|
||||
cat > /tmp/data << "EOD"
|
||||
${{ toJSON(steps) }}
|
||||
EOD
|
||||
echo "$(jq -r ".[].outputs.reportText" /tmp/data)" >> ${{ inputs.reportFile }}
|
||||
# Close report
|
||||
echo "</blockquote>" >> ${{ inputs.reportFile }}
|
||||
echo "</details>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,74 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * Copyright (c) 2023 FreeCAD Project Association *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: runCPPTests
|
||||
description: "Run C++ tests, generate log and report"
|
||||
|
||||
inputs:
|
||||
testCommand:
|
||||
description: "Test command to be run"
|
||||
required: true
|
||||
testLogFile:
|
||||
description: "Path for the command-line output of the tests"
|
||||
required: true
|
||||
testName:
|
||||
description: "A descriptive name for the test suite"
|
||||
required: true
|
||||
outputs:
|
||||
reportText:
|
||||
description: "Report text"
|
||||
value: ${{ steps.report.outputs.reportText }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run C++ tests
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
${{ inputs.testCommand }} | tee -a ${{ inputs.testLogFile }}
|
||||
- name: Parse test results
|
||||
if: always()
|
||||
id: report
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
result=$(sed -ne "/Global test environment tear-down/,/^$/{/^$/d;p}" ${{ inputs.testLogFile }})
|
||||
if grep -qF "[ FAILED ]" <<< $result
|
||||
then
|
||||
reportText="<details><summary>:fire: GTest C++ test suite '${{ inputs.testName }}' failed</summary>\n"
|
||||
else
|
||||
reportText="<details><summary>:heavy_check_mark: GTest C++ test suite '${{ inputs.testName }}' succeeded</summary>\n"
|
||||
fi
|
||||
reportText+="\n"
|
||||
reportText+="Results\n"
|
||||
reportText+="\n"
|
||||
reportText+='```\n'
|
||||
reportText+="$result\n"
|
||||
reportText+='```\n'
|
||||
reportText+="</details>\n"
|
||||
reportText+="\n"
|
||||
echo "reportText<<EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText" >> $GITHUB_OUTPUT
|
||||
echo "EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText"
|
||||
@@ -1,82 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: runPythonTests
|
||||
description: "Run Python tests, generate log and report"
|
||||
|
||||
inputs:
|
||||
testDescription:
|
||||
description: "Test description text, will be used on report"
|
||||
required: true
|
||||
testCommand:
|
||||
description: "Test command to be run"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run tests
|
||||
id: runTests
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
set -o pipefail
|
||||
${{ inputs.testCommand }} | sed -Ee "/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d" | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash -l {0}
|
||||
if: always()
|
||||
run: |
|
||||
sed -ne "/^\(FAILED\|ERROR\):/,/^[[:blank:]]*$/bF; /^Traceback/,/^[^[:blank:]]/{/^Traceback/bT; /^[^[:blank:]]/G; bT}; b; :T w ${{ inputs.logFile }}_tracebacks" -e "b; :F w ${{ inputs.logFile }}_failedtests" ${{ inputs.logFile }}
|
||||
icon=""
|
||||
if [ $( cat ${{ inputs.logFile }}_tracebacks | wc -l ) -gt 0 ]
|
||||
then
|
||||
icon=" :fire:"
|
||||
fi
|
||||
if [ ${{ steps.runTests.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: ${{ inputs.testDescription }} succeeded$icon</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: ${{ inputs.testDescription }} failed$icon</summary>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Failed tests" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }}_failedtests >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
if [ $( cat ${{ inputs.logFile }}_tracebacks | wc -l ) -gt 0 ]
|
||||
then
|
||||
echo "Uncaught tracebacks -- these tracebacks appeared during test but didn't fail a test --" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }}_tracebacks >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,78 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This action aims at speeding up CI and reduce dependency to external resources
|
||||
# by creating a cache of Ccache needed binaries then using it for CI runs rather
|
||||
# than downloading every time.
|
||||
#
|
||||
# If it needs to be updated to another version, the process it to change
|
||||
# 'downloadpath' and 'version' inputs below then delete the existing cache
|
||||
# from Github interface so a new one is generated using new values.
|
||||
|
||||
name: getCcache
|
||||
description: "Windows: tries to get a cached version of Ccache and create one if fails"
|
||||
|
||||
inputs:
|
||||
ccachebindir:
|
||||
description: "Directory where ccache binaries shall be stored"
|
||||
required: true
|
||||
# Below inputs shall generally not be provided as they won't be used if a cached version exists
|
||||
# They are mainly used because Github do not support adding env variables in a composite action
|
||||
ccachedownloadpath:
|
||||
description: "Path where to download ccache"
|
||||
required: false
|
||||
default: https://github.com/ccache/ccache/releases/download/v4.9/
|
||||
ccacheversion:
|
||||
description: "Ccache version to be downloaded"
|
||||
required: false
|
||||
default: ccache-4.9-windows-x86_64
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create destination directory
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.ccachebindir }}
|
||||
- name: Get cached version
|
||||
uses: actions/cache/restore@v4
|
||||
id: getCached
|
||||
with:
|
||||
path: ${{ inputs.ccachebindir }}
|
||||
key: ccacheforwin-${{ inputs.ccacheversion }}
|
||||
- name: Download ccache
|
||||
shell: bash
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -L -o ccache.zip ${{ inputs.ccachedownloadpath }}${{ inputs.ccacheversion }}.zip
|
||||
7z x ccache.zip -o"ccachetemp" -r -y
|
||||
cp -a ccachetemp/${{ inputs.ccacheversion }}/ccache.exe ${{ inputs.ccachebindir }}
|
||||
cp -a ccachetemp/${{ inputs.ccacheversion }}/ccache.exe ${{ inputs.ccachebindir }}/cl.exe
|
||||
rm ccache.zip
|
||||
rm -rf ccachetemp
|
||||
- name: Save version to cache
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ inputs.ccachebindir }}
|
||||
key: ${{ steps.getCached.outputs.cache-primary-key }}
|
||||
@@ -1,76 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This action aims at speeding up CI and reduce dependency to external resources
|
||||
# by creating a cache of Libpack needed files then using it for CI runs rather
|
||||
# than downloading every time.
|
||||
#
|
||||
# If it needs to be updated to another version, the process it to change
|
||||
# 'downloadpath' and 'version' inputs below then delete the existing cache
|
||||
# from Github interface so a new one is generated using new values.
|
||||
|
||||
name: getLibpack
|
||||
description: "Windows: tries to get a cached version of Libpack and create one if fails"
|
||||
|
||||
inputs:
|
||||
libpackdir:
|
||||
description: "Directory where libpack files shall be stored"
|
||||
required: true
|
||||
# Below inputs shall generally not be provided as they won't be used if a cached version exists
|
||||
# They are mainly used because Github do not support adding env variables in a composite action
|
||||
libpackdownloadurl:
|
||||
description: "URL where to download libpack"
|
||||
required: false
|
||||
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/3.0.0RC4/LibPack-1.0.0-v3.0.0RC4-Release.7z
|
||||
libpackname:
|
||||
description: "Libpack name (once downloaded)"
|
||||
required: false
|
||||
default: LibPack-1.0.0-v3.0.0RC4-Release
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create destination directory
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.libpackdir }}
|
||||
- name: Get cached version
|
||||
uses: actions/cache/restore@v4
|
||||
id: getCached
|
||||
with:
|
||||
path: ${{ inputs.libpackdir }}
|
||||
key: libpackforwin-${{ inputs.libpackname }}
|
||||
- name: Download libpack
|
||||
shell: bash
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -L -o libpack.7z ${{ inputs.libpackdownloadurl }}
|
||||
7z x libpack.7z -o"libpacktemp" -r -y
|
||||
mv libpacktemp/${{ inputs.libpackname }}/* ${{ inputs.libpackdir }}
|
||||
rm -rf libpacktemp
|
||||
- name: Save version to cache
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ inputs.libpackdir }}
|
||||
key: ${{ steps.getCached.outputs.cache-primary-key }}
|
||||
@@ -0,0 +1,31 @@
|
||||
# GitHub Action to automate the identification of common misspellings in text files.
|
||||
# https://github.com/codespell-project/actions-codespell
|
||||
# https://github.com/codespell-project/codespell
|
||||
|
||||
name: Codespell
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v12.2
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
check_filenames: true
|
||||
ignore_words_file: .github/codespellignore
|
||||
skip: ./.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/
|
||||
path: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
@@ -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
|
||||
@@ -17,8 +17,8 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v5
|
||||
- uses: actions/labeler@v3
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: ".github/labels.yml"
|
||||
sync-labels: false
|
||||
sync-labels: false
|
||||
@@ -1,171 +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
|
||||
- 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 }}
|
||||
@@ -1,171 +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 (Intel)
|
||||
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-13
|
||||
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: x86_64-apple-darwin13.4.0-clang
|
||||
CXX: x86_64-apple-darwin13.4.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
|
||||
- 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 }}
|
||||
@@ -1,250 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Ubuntu 20.04 using GCC.
|
||||
|
||||
name: Build Ubuntu 20.04
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-20.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/release/
|
||||
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@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install FreeCAD dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
ccache \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk7-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libyaml-cpp-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
ninja-build \
|
||||
occt-draw \
|
||||
pyqt5-dev-tools \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwidgets \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
xvfb
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 5
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: -G Ninja --preset release
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,200 +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 22.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-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
|
||||
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
|
||||
- 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 }}
|
||||
@@ -1,211 +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 22.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-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
|
||||
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-qt6.yaml
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libegl1 \
|
||||
libgl1 \
|
||||
libglx0 \
|
||||
libopengl0
|
||||
./conda/setup-environment-qt6.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: 6
|
||||
- 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
|
||||
-DQT_HOST_PATH=${{ github.workspace }}/.conda/freecad/
|
||||
-DFREECAD_QT_VERSION=6
|
||||
-DBUILD_REVERSEENGINEERING=OFF
|
||||
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 }}
|
||||
@@ -1,136 +0,0 @@
|
||||
# ***************************************************************************
|
||||
# * Copyright (c) 2023 0penBrain *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||
# * as published by the Free Software Foundation; either version 2 of *
|
||||
# * the License, or (at your option) any later version. *
|
||||
# * for detail see the LICENCE text file. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU Library General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Library General Public *
|
||||
# * License along with this program; if not, write to the Free Software *
|
||||
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Windows using MSVC.
|
||||
|
||||
name: Build Windows
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: C:/FC/cache/
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_DIRECT: true
|
||||
#CCACHE_SLOPPINESS: "pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
## Have to use C:\ because not enough space on workspace drive
|
||||
builddir: C:/FC/build/release/
|
||||
libpackdir: C:/FC/libpack/
|
||||
ccachebindir: C:/FC/ccache/
|
||||
logdir: C:/logs/
|
||||
reportdir: C:/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir ${{ env.CCACHE_DIR }}
|
||||
mkdir ${{ env.ccachebindir }}
|
||||
mkdir ${{ env.libpackdir }}
|
||||
mkdir ${{ env.builddir }}
|
||||
mkdir ${{ env.logdir }}
|
||||
mkdir ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Get Ccache
|
||||
uses: ./.github/workflows/actions/windows/getCcache
|
||||
with:
|
||||
ccachebindir: ${{ env.ccachebindir }}
|
||||
- name: Get Libpack
|
||||
uses: ./.github/workflows/actions/windows/getLibpack
|
||||
with:
|
||||
libpackdir: ${{ env.libpackdir }}
|
||||
- name: Restore compiler cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-Windows-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-Windows-${{ github.ref }}-
|
||||
FC-Windows-
|
||||
- name: Print Ccache statistics before build, reset stats and print config
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
. $env:ccachebindir\ccache -z
|
||||
. $env:ccachebindir\ccache -p
|
||||
- name: Configuring CMake
|
||||
run: >
|
||||
cmake -B"${{ env.builddir }}" .
|
||||
--preset release
|
||||
-DCMAKE_VS_NO_COMPILE_BATCHING=ON
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DFREECAD_USE_PCH=OFF
|
||||
-DFREECAD_RELEASE_PDB=OFF
|
||||
-DFREECAD_LIBPACK_DIR="${{ env.libpackdir }}"
|
||||
-DFREECAD_COPY_DEPEND_DIRS_TO_BUILD=ON
|
||||
-DFREECAD_COPY_LIBPACK_BIN_TO_BUILD=ON
|
||||
-DFREECAD_COPY_PLUGINS_BIN_TO_BUILD=ON
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Compiling sources
|
||||
run: |
|
||||
cd $env:builddir
|
||||
msbuild ALL_BUILD.vcxproj /m /p:Configuration=Release /p:TrackFileAccess=false /p:CLToolPath=${{ env.ccachebindir }}
|
||||
- name: Print Ccache statistics after build
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
- name: C++ unit tests
|
||||
if: false # Disabled because seems to not function on Windows build
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
. ${{ env.builddir }}\tests\Release\Tests_run --gtest_output=json:${{ env.reportdir }}gtest_results.json # 2>&1 | tee -filepath ${{ env.logdir }}\unitTests.log
|
||||
- name: FreeCAD CLI tests
|
||||
run: |
|
||||
. ${{ env.builddir }}\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}\integrationTests.log
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
@@ -1,133 +0,0 @@
|
||||
# ***************************************************************************
|
||||
# * Copyright (c) 2023 0penBrain *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||
# * as published by the Free Software Foundation; either version 2 of *
|
||||
# * the License, or (at your option) any later version. *
|
||||
# * for detail see the LICENCE text file. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU Library General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Library General Public *
|
||||
# * License along with this program; if not, write to the Free Software *
|
||||
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD using a Conda environment on Windows with MSVC.
|
||||
|
||||
name: Build Windows (Conda)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: C:/FC/cache/
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_DIRECT: true
|
||||
#CCACHE_SLOPPINESS: "pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
## Have to use C:\ because not enough space on workspace drive
|
||||
builddir: C:/FC/build/
|
||||
logdir: C:/logs/
|
||||
reportdir: C:/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: 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
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
conda config --add envs_dirs $PWD/.conda
|
||||
mamba-devenv --no-prune -f conda/environment.devenv.yml
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir ${{ env.CCACHE_DIR }}
|
||||
mkdir ${{ env.builddir }}
|
||||
mkdir ${{ env.logdir }}
|
||||
mkdir ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Restore compiler cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-Windows-Conda-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-Windows-Conda-${{ github.ref }}-
|
||||
FC-Windows-Conda-
|
||||
- name: Print Ccache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: Configuring CMake
|
||||
shell: cmd /C CALL {0}
|
||||
run: >
|
||||
conda\cmake.cmd --preset conda-windows-release -DFREECAD_USE_PCH:BOOL=OFF -DFREECAD_RELEASE_PDB:BOOL=OFF -DFREECAD_USE_CCACHE:BOOL=ON
|
||||
- name: Compiling sources
|
||||
shell: cmd /C CALL {0}
|
||||
run: >
|
||||
conda\cmake.cmd --build build\release
|
||||
- name: Print Ccache statistics after build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: CMake Install
|
||||
shell: cmd /C CALL {0}
|
||||
run: |
|
||||
conda\cmake.cmd --install build\release
|
||||
- name: C++ unit tests
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
. build\release\tests\Tests_run --gtest_output=json:${{ env.reportdir }}gtest_results.json # 2>&1 | tee -filepath ${{ env.logdir }}/unitTests.log
|
||||
- name: FreeCAD CLI tests
|
||||
run: |
|
||||
. build\release\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}/integrationTests.log
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
@@ -1,769 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the lint workflow for CI of FreeCAD
|
||||
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
changedFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedCppFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedPythonFiles:
|
||||
type: string
|
||||
required: true
|
||||
checkLineendings:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
lineendingsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkWhitespace:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
whitespaceFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkTabs:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
tabsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkQtConnections:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
qtConnectionsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkCpplint:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
cpplintFilters:
|
||||
default: -whitespace-*
|
||||
type: string
|
||||
required: false
|
||||
cpplintLineLength:
|
||||
default: 120
|
||||
type: string
|
||||
required: false
|
||||
cpplintFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkPylint:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
pylintDisable:
|
||||
default: C0302,C0303 # Trailing whitespaces (C0303) are already checked
|
||||
type: string
|
||||
required: false
|
||||
pylintFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkBlack:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
blackFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkClangFormat:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
clangStyle:
|
||||
default: file # for .clang-format file
|
||||
type: string
|
||||
required: false
|
||||
clangFormatFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkSpelling:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
listIgnoredMisspelling:
|
||||
default: .github/codespellignore
|
||||
type: string
|
||||
required: false
|
||||
spellingIgnore:
|
||||
default: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL*,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/
|
||||
type: string
|
||||
required: false
|
||||
codespellFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkClangTidy:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clangTidyChecks:
|
||||
default: # empty to use the .clang-tidy file
|
||||
type: string
|
||||
required: false
|
||||
clangTidyFailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazy: # for the Message codes see: https://invent.kde.org/sdk/clazy#list-of-checks
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clazyChecks:
|
||||
default: level2,no-non-pod-global-static,no-copyable-polymorphic
|
||||
type: string
|
||||
required: false
|
||||
clazyFailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazyQT6:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clazyQT6Checks:
|
||||
default: qt6-deprecated-api-fixes,qt6-header-fixes,qt6-qhash-signature,qt6-fwd-fixes,missing-qobject-macro # for QT6 Porting https://invent.kde.org/sdk/clazy#list-of-checks
|
||||
type: string
|
||||
required: false
|
||||
QT6Branch: # branch to check for QT6 Porting
|
||||
default: main
|
||||
type: string
|
||||
required: false
|
||||
clazyQT6FailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Lint.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Lint:
|
||||
if: inputs.changedFiles != ''
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
logdir: /tmp/logs/
|
||||
fixesdir: /tmp/fixes/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.fixesdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
# Run generic lints
|
||||
- name: Check for non Unix line ending
|
||||
if: inputs.checkLineendings && always()
|
||||
continue-on-error: ${{ inputs.lineendingsFailSilent }}
|
||||
run: |
|
||||
lineendings=0
|
||||
for file in ${{ inputs.changedFiles }}
|
||||
do
|
||||
# Check for DOS or MAC line endings
|
||||
if [[ $(file -b $file) =~ "with CR" ]]
|
||||
then
|
||||
echo "::warning file=$file,title=$file::File has non Unix line endings"
|
||||
echo "$file has non Unix line endings" >> ${{ env.logdir }}lineendings.log
|
||||
((lineendings=lineendings+1))
|
||||
fi
|
||||
done
|
||||
echo "Found $lineendings line ending errors"
|
||||
# Write the report
|
||||
if [ $lineendings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:information_source: Found $lineendings problems with line endings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}lineendings.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No line ending problem found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $lineendings -eq 0 ]
|
||||
- name: Check for trailing whitespaces
|
||||
if: inputs.checkWhitespace && always()
|
||||
continue-on-error: ${{ inputs.whitespaceFailSilent }}
|
||||
run: |
|
||||
whitespaceErrors=0
|
||||
exclude="*[.md]"
|
||||
for file in ${{ inputs.changedFiles }}
|
||||
do
|
||||
# Check for trailing whitespaces
|
||||
grep -nIHE --exclude="$exclude" " $" $file | sed -e "s/$/<-- trailing whitespace/" >> ${{ env.logdir }}whitespace.log || true
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}whitespace.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}whitespace.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
whitespaceErrors=$(wc -l < ${{ env.logdir }}whitespace.log)
|
||||
fi
|
||||
echo "Found $whitespaceErrors whitespace errors"
|
||||
# Write the report
|
||||
if [ $whitespaceErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:information_source: Found $whitespaceErrors trailing whitespace</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}whitespace.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No trailing whitespace found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $whitespaceErrors -eq 0 ]
|
||||
- name: Check for Tab usage
|
||||
if: inputs.checkTabs && always()
|
||||
continue-on-error: ${{ inputs.tabsFailSilent }}
|
||||
run: |
|
||||
tabErrors=0
|
||||
exclude="*[.md]"
|
||||
# Check for Tab usage
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
do
|
||||
grep -nIHE --exclude="$exclude" $'\t' $file | sed -e "s/$/ <-- contains tab/" >> ${{ env.logdir }}tab.log || true
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}tab.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}tab.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
tabErrors=$(wc -l < ${{ env.logdir }}tab.log)
|
||||
fi
|
||||
echo "Found $tabErrors tab errors"
|
||||
# Write the report
|
||||
if [ $tabErrors -gt 0 ]; then
|
||||
echo "<details><summary>:information_source: Found $tabErrors tabs, better to use spaces</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}tab.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No tabs found" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $tabErrors -eq 0 ]
|
||||
# Run Python lints
|
||||
- name: Pylint
|
||||
if: inputs.checkPylint && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.pylintFailSilent }}
|
||||
run: |
|
||||
pylintErrors=0
|
||||
pylintWarnings=0
|
||||
pylintRefactorings=0
|
||||
pylintConventions=0
|
||||
pip install --break-system-packages pylint
|
||||
# List enabled pylint checks
|
||||
pylint --list-msgs-enabled > ${{ env.logdir }}pylint-enabled-checks.log
|
||||
# Run pylint on all python files
|
||||
set +e
|
||||
pylint --disable=${{ inputs.pylintDisable }} ${{ inputs.changedPythonFiles }} > ${{ env.logdir }}pylint.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If pylint has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}pylint.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintError.json"
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintWarning.json"
|
||||
cat ${{ env.logdir }}pylint.log
|
||||
echo "::remove-matcher owner=pylint-error::"
|
||||
echo "::remove-matcher owner=pylint-warning::"
|
||||
pylintErrors=$( grep -oP '(?<=error \|)\d+' ${{ env.logdir }}pylint.log) || true # grep returns 0 if no match is found
|
||||
pylintWarnings=$( grep -oP '(?<=warning \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
pylintRefactorings=$( grep -oP '(?<=refactor \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
pylintConventions=$( grep -oP '(?<=convention \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
fi
|
||||
echo "Found $pylintErrors errors, $pylintWarnings warnings, $pylintRefactorings refactorings, $pylintConventions conventions"
|
||||
# Write the report
|
||||
if [ $pylintErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Pylint found :fire: $pylintErrors errors, :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintWarnings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Pylint found :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintRefactorings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:construction: Pylint found :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintConventions -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Pylint found :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: No pylint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# List enabled checks in the report
|
||||
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}pylint-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}pylint.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $pylintErrors -eq 0 ]
|
||||
- name: Black (Python)
|
||||
if: inputs.checkBlack && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.blackFailSilent }}
|
||||
run: |
|
||||
blackReformats=0
|
||||
blackFails=0
|
||||
pip install --break-system-packages black
|
||||
set +e
|
||||
black --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If black has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}black.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/blackWarning.json"
|
||||
cat ${{ env.logdir }}black.log
|
||||
echo "::remove-matcher owner=black-warning::"
|
||||
blackReformats=$( grep -oP '\d+(?= fil.+ would be reformatted)' ${{ env.logdir }}black.log) || true # grep returns 0 if no match is found
|
||||
blackFails=$( grep -oP '\d+(?= fil.+ would fail to reformat)' ${{ env.logdir }}black.log) || true
|
||||
fi
|
||||
echo "Found $blackReformats files would be reformatted and $blackFails files would fail to reformat"
|
||||
# Write the report
|
||||
if [ $blackReformats -gt 0 ] || [ $blackFails -gt 0 ] #FIXME purpose of testing $blackFails as we don't use it then
|
||||
then
|
||||
echo "<details><summary>:pencil2: Black would reformat $blackReformats files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Black would reformat no file</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}black.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $exitCode -eq 0 ]
|
||||
# Run C++ lints
|
||||
- name: Install FreeCAD dependencies
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk9-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libyaml-cpp-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
occt-draw \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwidgets \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
ccache \
|
||||
xvfb
|
||||
- name: Run CMake # This is needed for Clang tools to work correctly
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: |
|
||||
mkdir build && cmake -S ./ -B ./build/ -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
|
||||
- name: Check old Qt string-based connections (https://wiki.qt.io/New_Signal_Slot_Syntax)
|
||||
if: inputs.checkQtConnections && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.qtConnectionsFailSilent }}
|
||||
run: |
|
||||
qtconnectionSyntax=0
|
||||
exclude="*[.md,.log,.ts,.git]"
|
||||
# Check all files for QT string-based connections
|
||||
for file in ${{ inputs.changedFiles }} #TODO does this makes sense in Python files ?
|
||||
do
|
||||
grep -nIHE --exclude="$exclude" $' SIGNAL| SLOT' $file | sed -e "s/$/ <--Consider using Functor-Based Connections/" >> ${{ env.logdir }}qtConnections.log || true #TODO seems to trigger false positives
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}qtConnections.log ]; then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}qtConnections.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
qtconnectionSyntax=$(wc -l < ${{ env.logdir }}qtConnections.log)
|
||||
fi
|
||||
echo "Found $qtconnectionSyntax QT string-based connections"
|
||||
# Write the report
|
||||
if [ $qtconnectionSyntax -gt 0 ]; then
|
||||
echo "<details><summary>:information_source: Found $qtconnectionSyntax QT string-based connections :arrow_right: consider using QT functor-Based Connections</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# documentation link
|
||||
echo "For more information see: https://wiki.qt.io/New_Signal_Slot_Syntax or https://github.com/FreeCAD/FreeCAD/issues/6166" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}qtConnections.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No string-based connections found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $qtconnectionSyntax -eq 0 ]
|
||||
- name: Cpplint
|
||||
if: inputs.checkCpplint && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.cpplintFailSilent }}
|
||||
run: |
|
||||
cpplintErrors=0
|
||||
pip install --break-system-packages cpplint
|
||||
# Run cpplint
|
||||
for file in ${{ inputs.changedCppFiles }}
|
||||
do
|
||||
cpplint --filter=${{ inputs.cpplintFilters }} --linelength=${{ inputs.cpplintLineLength }} $file &>> ${{ env.logdir }}cpplint.log || true
|
||||
done
|
||||
# If cpplint has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ ${{ env.logdir }}cpplint.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/cpplint.json"
|
||||
cat ${{ env.logdir }}cpplint.log
|
||||
echo "::remove-matcher owner=cpplint::"
|
||||
cpplintErrors=$(grep -nIHE "\[[0-9]\]$" ${{ env.logdir }}cpplint.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $cpplintErrors cpplint errors"
|
||||
# Write the report
|
||||
if [ $cpplintErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: CppLint found $cpplintErrors errors / warnings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: No cpplint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}cpplint.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $cpplintErrors -eq 0 ]
|
||||
- name: Clang-format
|
||||
if: inputs.checkClangFormat && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangFormatFailSilent }}
|
||||
run: |
|
||||
clangFormatErrors=0
|
||||
# Run clang-format on all cpp files
|
||||
clang-format --dry-run --ferror-limit=1 --verbose --style=${{ inputs.clangStyle }} ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-format.log || true
|
||||
# If clang-format has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clang-format.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clang-format.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clangFormatErrors=$(grep -nIHE "\[-Wclang-format-violations]$" ${{ env.logdir }}clang-format.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clangFormatErrors clang-format errors"
|
||||
# Write the report
|
||||
if [ $clangFormatErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clang-format would reformat $clangFormatErrors files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clang-format would reformat no file</summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-format.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clangFormatErrors -eq 0 ]
|
||||
- name: Codespell
|
||||
if: inputs.checkSpelling && always()
|
||||
continue-on-error: ${{ inputs.codespellFailSilent }}
|
||||
run: |
|
||||
pip install --break-system-packages codespell
|
||||
wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
|
||||
#wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary_rare.txt
|
||||
set +e
|
||||
misspellings=$( { codespell --quiet-level 3 --summary --count --ignore-words ${{ inputs.listIgnoredMisspelling }} --skip ${{ inputs.spellingIgnore }} -D dictionary.txt ${{ inputs.changedFiles }} > ${{ env.logdir }}codespell.log ; } 2>&1 )
|
||||
set -e
|
||||
# If codespell has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}codespell.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/codespell.json"
|
||||
cat ${{ env.logdir }}codespell.log
|
||||
echo "::remove-matcher owner=codespell::"
|
||||
fi
|
||||
echo "Found $misspellings misspellings"
|
||||
# Write the report
|
||||
if [ $misspellings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Codespell found $misspellings misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Codespell found no misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "To ignore false positives, append the word to the [.github/codespellignore](https://github.com/FreeCAD/FreeCAD/blob/master/.github/codespellignore) file (lowercase)" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}codespell.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $misspellings -eq 0 ]
|
||||
- name: Clang-tidy
|
||||
if: inputs.checkClangTidy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangTidyFailSilent }}
|
||||
run: |
|
||||
clangTidyErrors=0
|
||||
clangTidyWarnings=0
|
||||
clangTidyNotes=0
|
||||
sudo apt-get install -y --no-install-recommends clang-tidy
|
||||
#TODO: check where this "clang-tidy.yaml" goes ; shall this be put in the fixes ?
|
||||
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ --explain-config &>> ${{ env.logdir }}clang-tidy-enabled-checks.log
|
||||
# Run clang-tidy on all cpp files
|
||||
set +e
|
||||
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-tidy.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If clang-tidy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clang-tidy.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clang-tidy.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clangTidyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
clangTidyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
clangTidyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clangTidyErrors errors, $clangTidyWarnings warnings, $clangTidyNotes notes"
|
||||
# Write the report
|
||||
if [ $clangTidyErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clang-Tidy found :fire: $clangTidyErrors errors, :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $clangTidyWarnings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clang-Tidy found :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $clangTidyNotes -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clang-Tidy found :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clang-Tidy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# List enabled checks in the report
|
||||
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-tidy-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-tidy.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clangTidyErrors -eq 0 ]
|
||||
- name: Clazy
|
||||
if: inputs.checkClazy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clazyFailSilent }}
|
||||
run: |
|
||||
clazyErrors=0
|
||||
clazyWarnings=0
|
||||
clazyNotes=0
|
||||
sudo apt-get install -y --no-install-recommends clazy
|
||||
#TODO: check where this "clazy.yaml" goes ; shall this be put in the fixes ?
|
||||
# Run clazy on all cpp files
|
||||
clazy-standalone --export-fixes=clazy.yaml -checks=${{ inputs.clazyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazy.log || true
|
||||
# If clazy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clazy.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clazy.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clazyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
clazyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
clazyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clazyErrors errors, $clazyWarnings warnings, $clazyNotes notes"
|
||||
# Write the report
|
||||
if [ "$clazyErrors" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clazy found :fire: $clazyErrors errors, :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyWarnings" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clazy found :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyNotes" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "[List of checks](https://github.com/KDE/clazy#list-of-checks), [This explains some of the clazy warnings](https://www.kdab.com/uncovering-32-qt-best-practices-compile-time-clazy/) " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clazy.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clazyErrors -eq 0 ]
|
||||
- name: Clazy-QT6
|
||||
if: inputs.checkClazyQT6 && inputs.changedCppFiles != '' && github.ref == inputs.QT6Branch && always()
|
||||
continue-on-error: ${{ inputs.clazyQT6FailSilent }}
|
||||
run: |
|
||||
clazyQT6Errors=0
|
||||
clazyQT6Warnings=0
|
||||
clazyQT6Notes=0
|
||||
sudo apt-get install -y --no-install-recommends clazy
|
||||
#TODO: check where this "clazyQT6.yaml" goes ; shall this be put in the fixes ?
|
||||
# Run clazy checks for Qt6 on all cpp files
|
||||
clazy-standalone --export-fixes=clazyQT6.yaml -checks=${{ inputs.clazyQT6Checks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazyQT6.log || true
|
||||
# If clazy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clazyQT6.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clazyQT6.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clazyQT6Errors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
clazyQT6Warnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
clazyQT6Notes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clazyQT6Errors errors, $clazyQT6Warnings warnings, $clazyQT6Notes notes"
|
||||
# Write the report
|
||||
if [ "$clazyQT6Errors" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clazy found :fire: $clazyQT6Errors errors, :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyQT6Warnings" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clazy found :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyNotes" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clazyQT6.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clazyQT6Errors -eq 0 ]
|
||||
- name: Upload logs and fixes
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
${{ env.fixesdir }}
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,162 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the pre-check workflow for CI of FreeCAD.
|
||||
# It aims at running some basic checks about the workflow run ...
|
||||
# ... and gathering some data needed for the next steps.
|
||||
|
||||
name: Prepare
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
dontFailOnOldRebase:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
maxRebaseHours:
|
||||
default: "48"
|
||||
type: string
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Prepare.outputs.reportFile }}
|
||||
changedFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedFiles }}
|
||||
changedPythonFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedPythonFiles }}
|
||||
changedCppFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedCppFiles }}
|
||||
|
||||
jobs:
|
||||
|
||||
Prepare:
|
||||
env:
|
||||
isPR: ${{ github.event_name == 'pull_request' }}
|
||||
isPush: ${{ github.event_name == 'push' }}
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
changedFiles: ${{ steps.Output.outputs.changedFiles }}
|
||||
changedPythonFiles: ${{ steps.Output.outputs.changedPythonFiles }}
|
||||
changedCppFiles: ${{ steps.Output.outputs.changedCppFiles }}
|
||||
|
||||
steps:
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
commitCnt=0
|
||||
touch ${{ env.logdir }}changedFiles.lst ${{ env.logdir }}changedCppFiles.lst ${{ env.logdir }}changedPythonFiles.lst
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Determine base and head SHA in case of PR
|
||||
if: env.isPR == 'true'
|
||||
run: |
|
||||
baseSha=${{ github.event.pull_request.base.sha }}
|
||||
headSha=${{ github.event.pull_request.head.sha }}
|
||||
echo "baseSha=$baseSha" >> $GITHUB_ENV
|
||||
echo "headSha=$headSha" >> $GITHUB_ENV
|
||||
echo "This CI run is performed on a Pull Request" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Base SHA is $baseSha, Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Check if PR has been recently rebased
|
||||
if: env.isPR == 'true'
|
||||
continue-on-error: ${{ inputs.dontFailOnOldRebase }}
|
||||
run: |
|
||||
baseDate=$(curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/commits/$baseSha | jq -r '.commit.committer.date')
|
||||
dateDiff=$(( ( $(date +%s) - $(date -d $baseDate +%s) ) / 3600 ))
|
||||
echo "Pull request is based on a $dateDiff hour-old commit" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
if [ $dateDiff -gt ${{ inputs.maxRebaseHours }} ]
|
||||
then
|
||||
echo -n ":warning: Pull request should be rebased" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
exit 1
|
||||
fi
|
||||
- name: Determine base and head SHA in case of push
|
||||
if: env.isPush == 'true'
|
||||
run: |
|
||||
baseSha=${{ github.event.before }}
|
||||
headSha=${{ github.event.after }}
|
||||
echo "headSha=$headSha" >> $GITHUB_ENV
|
||||
if [ $baseSha -eq 0 ]
|
||||
then
|
||||
echo "This CI run is performed on a Push that created a new branch : files changed will be ignored" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "isPush='false'" >> $GITHUB_ENV
|
||||
else
|
||||
echo "This CI run is performed on a Push" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Base SHA is $baseSha, Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "baseSha=$baseSha" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Get compare between head and base
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
echo "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/compare/$baseSha...$headSha"
|
||||
curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/compare/$baseSha...$headSha > ${{ env.logdir }}compare.json
|
||||
- name: Get number of commits in the changeset
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
commitCnt=$(jq -re '.ahead_by' ${{ env.logdir }}compare.json)
|
||||
echo "Changeset is composed of $commitCnt commit(s)" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Get files modified in changeset #TODO check what happens with deleted file in the subsequent process
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
jq '.files[] | if .status != "removed" then .filename else empty end' ${{ env.logdir }}compare.json > ${{ env.logdir }}changedFiles.lst
|
||||
grep -E '\.(py|py3)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedPythonFiles.lst || true
|
||||
grep -E '\.(c|c\+\+|cc|cpp|cu|cuh|cxx|h|h\+\+|hh|hpp|hxx)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedCppFiles.lst || true
|
||||
# Write the report
|
||||
echo "::group::Modified files in changeset (removed files are ignored) :" ; cat ${{ env.logdir }}changedFiles.lst ; echo "::endgroup::"
|
||||
echo "<details><summary>Modified files (removed files are ignored):</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}changedFiles.lst >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Transmitting outputs
|
||||
id: Output
|
||||
run: |
|
||||
echo "changedFiles=$(cat ${{ env.logdir }}changedFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedPythonFiles=$(cat ${{ env.logdir }}changedPythonFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedCppFiles=$(cat ${{ env.logdir }}changedCppFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "" >> $GITHUB_OUTPUT
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,117 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a generic wrapup workflow that only aims at gathering reports and ...
|
||||
# ... presenting them as a unified summary
|
||||
#
|
||||
# It expects steps to be summarized to be presented a JSON input formatted ...
|
||||
# ... as the "needs" context of Github :
|
||||
# https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
|
||||
# In addition to standard "result", each step shall have a string entry in "outputs" ...
|
||||
# ... named "reportFile" containing the name of the corresponding report. The ...
|
||||
# ... report file shall be available in an artifact with the same name.
|
||||
|
||||
name: WrapUp
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
previousSteps:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
|
||||
WrapUp:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
artifactsDownloadDir: /tmp/artifacts/
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Make needed directories, files and initializations
|
||||
run: |
|
||||
mkdir -p ${{ env.artifactsDownloadDir }}
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ${{ env.artifactsDownloadDir }}
|
||||
- name: Save input data to file
|
||||
run: |
|
||||
cat > data << "EOD"
|
||||
${{ inputs.previousSteps }}
|
||||
EOD
|
||||
- name: Compute the report
|
||||
run: |
|
||||
echo "usedArtifacts<<EOD" >> $GITHUB_ENV
|
||||
for step in $(jq -r "keys_unsorted | .[]" data)
|
||||
do
|
||||
echo "Processing step $step"
|
||||
result=$(jq -r ".\"$step\".result" data)
|
||||
icon=":heavy_check_mark:"
|
||||
if [ $result == 'failure' ]
|
||||
then
|
||||
icon=":x:"
|
||||
elif [ $result == 'cancelled' ]
|
||||
then
|
||||
icon=":no_entry_sign:"
|
||||
elif [ $result == 'skipped' ]
|
||||
then
|
||||
icon=":white_check_mark:"
|
||||
fi
|
||||
echo "### $icon $step step" >> report.md
|
||||
if [ $result == 'skipped' ]
|
||||
then
|
||||
echo "Step was skipped, no report was generated" | tee -a report.md
|
||||
continue
|
||||
elif [ $result == 'cancelled' ]
|
||||
then
|
||||
echo "Step was cancelled when executing, report may be incomplete" | tee -a report.md
|
||||
fi
|
||||
report=$(jq -r ".\"$step\".outputs.reportFile" data)
|
||||
if [ $report ]
|
||||
then
|
||||
echo "Report for step $step is $report"
|
||||
echo "$report" >> $GITHUB_ENV
|
||||
if [ $(find ${{ env.artifactsDownloadDir }} -type f -name $report | wc -l) -eq 1 ]
|
||||
then
|
||||
find ${{ env.artifactsDownloadDir }} -type f -name $report -exec cat {} \; >> report.md
|
||||
else
|
||||
echo "No or several files found for report $report, not printing" | tee -a report.md
|
||||
echo "Below files found :"
|
||||
find ${{ env.artifactsDownloadDir }} -type f -name $report
|
||||
fi
|
||||
else
|
||||
echo "Report file was not set by step $step" | tee -a report.md
|
||||
fi
|
||||
echo "" >> report.md
|
||||
done
|
||||
echo "EOD" >> $GITHUB_ENV
|
||||
cat report.md >> $GITHUB_STEP_SUMMARY
|
||||
- name: Delete used artifacts
|
||||
continue-on-error: true
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: |
|
||||
${{ env.usedArtifacts }}
|
||||
@@ -1,30 +1,20 @@
|
||||
# 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
|
||||
*.lib
|
||||
*.pch
|
||||
*.vcproj
|
||||
*.kdev4
|
||||
*.exp
|
||||
*.dep
|
||||
*.manifest
|
||||
*.o
|
||||
*.orig
|
||||
*.output
|
||||
qrc_*.cpp
|
||||
BuildLog.htm
|
||||
cmake_install.cmake
|
||||
@@ -45,16 +35,10 @@ install_manifest.txt
|
||||
/Mod/
|
||||
/ZERO_CHECK.dir/
|
||||
/build/
|
||||
/cmake-build*/
|
||||
/src/Tools/offlinedoc/localwiki/
|
||||
/src/Tools/offlinedoc/*.txt
|
||||
/conda/environment.yml
|
||||
/.vscode/
|
||||
OpenSCAD_rc.py
|
||||
tags
|
||||
/CMakeUserPresets.json
|
||||
Testing
|
||||
compile_commands.json
|
||||
|
||||
# crowdin file
|
||||
src/Tools/freecad.zip
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,3 @@
|
||||
Wrn:
|
||||
Err:
|
||||
Cannot find icon:
|
||||
@@ -1,69 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
files: |
|
||||
(?x)^(
|
||||
src/Base|
|
||||
src/Main|
|
||||
src/Tools|
|
||||
tests/src|
|
||||
src/Mod/AddonManager|
|
||||
src/Mod/Assembly|
|
||||
src/Mod/CAM|
|
||||
src/Mod/Cloud|
|
||||
src/Mod/Drawing|
|
||||
src/Mod/Fem|
|
||||
src/Mod/Help|
|
||||
src/Mod/Import|
|
||||
src/Mod/Inspection|
|
||||
src/Mod/JtReader|
|
||||
src/Mod/Measure|
|
||||
src/Mod/Mesh|
|
||||
src/Mod/MeshPart|
|
||||
src/Mod/Plot|
|
||||
src/Mod/Points|
|
||||
src/Mod/ReverseEngineering|
|
||||
src/Mod/Robot|
|
||||
src/Mod/Show|
|
||||
src/Mod/Sketcher|
|
||||
src/Mod/Spreadsheet|
|
||||
src/Mod/Start|
|
||||
src/Mod/Surface|
|
||||
src/Mod/Test|
|
||||
src/Mod/Tux|
|
||||
src/Mod/Web
|
||||
)
|
||||
exclude: |
|
||||
(?x)^(
|
||||
.*vcproj.*|
|
||||
.*vcxproj.*|
|
||||
src/App/ExpressionParser.tab.c|
|
||||
src/App/ExpressionParser.tab.h|
|
||||
src/App/ExpressionParser.y|
|
||||
src/App/lex.ExpressionParser.c|
|
||||
src/Mod/Import/App/SCL|
|
||||
src/Mod/Import/App/SCL_output|
|
||||
src/Mod/Mesh/App/TestData|
|
||||
src/Mod/Mesh/App/WildMagic4|
|
||||
src/Mod/Robot/App/kdl_cp|
|
||||
src/Mod/Robot/Lib
|
||||
)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- id: mixed-line-ending
|
||||
- repo: https://github.com/psf/black
|
||||
rev: b965c2a5026f8ba399283ba3e01898b012853c79 # frozen: 24.8.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: ['--line-length', '100']
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: 7d85583be209cb547946c82fbe51f4bc5dd1d017 # frozen: v18.1.8
|
||||
hooks:
|
||||
- id: clang-format
|
||||
@@ -3,7 +3,7 @@
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=yes
|
||||
analyse-fallback-blocks=no
|
||||
|
||||
# Load and enable all available extensions. Use --list-extensions to see a list
|
||||
# all available extensions.
|
||||
@@ -57,7 +57,7 @@ ignore-patterns=^\.#
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis). It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=FreeCAD,FreeCADGui
|
||||
ignored-modules=
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
@@ -82,7 +82,7 @@ persistent=yes
|
||||
|
||||
# Minimum Python version to use for version dependent checks. Will default to
|
||||
# the version used to run pylint.
|
||||
py-version=3.8
|
||||
py-version=3.10
|
||||
|
||||
# Discover python modules and packages in the file system subtree.
|
||||
recursive=no
|
||||
@@ -227,7 +227,7 @@ const-naming-style=UPPER_CASE
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=4
|
||||
docstring-min-length=-1
|
||||
|
||||
# Naming style matching correct function names.
|
||||
function-naming-style=snake_case
|
||||
@@ -352,7 +352,7 @@ ignored-parents=
|
||||
max-args=5
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=15
|
||||
max-attributes=7
|
||||
|
||||
# Maximum number of boolean expressions in an if statement (see R0916).
|
||||
max-bool-expr=5
|
||||
@@ -376,14 +376,14 @@ max-returns=6
|
||||
max-statements=50
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=1
|
||||
min-public-methods=2
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when caught.
|
||||
overgeneral-exceptions=builtins.BaseException,
|
||||
builtins.Exception
|
||||
overgeneral-exceptions=BaseException,
|
||||
Exception
|
||||
|
||||
|
||||
[FORMAT]
|
||||
@@ -426,7 +426,7 @@ allow-any-import-level=
|
||||
allow-wildcard-with-all=no
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma.
|
||||
deprecated-modules=PySide2
|
||||
deprecated-modules=
|
||||
|
||||
# Output a graph (.gv or any supported image format) of external dependencies
|
||||
# to the given file (report RP0402 must not be disabled).
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
######
|
||||
#
|
||||
# Travis-CI configuration file for FreeCAD.
|
||||
#
|
||||
# This build configuration will build and test FreeCAD on both Linux
|
||||
# and Mac OS X. For Mac OS X, this configuration will also package
|
||||
# and deploy the build to GitHub provided the following prerequisites
|
||||
# are satisfied:
|
||||
#
|
||||
# GH_TOKEN is defined as a secure environment variable and contains a
|
||||
# a valid GitHub OAUTH token with repo_deployment scope.
|
||||
# NOTE: Define this env using the Travis-CI Repo Settings UI
|
||||
#
|
||||
# FREECAD_RELEASE: A GitHub Release with this identifier exists in the
|
||||
# repo. The Travis job will deploy the OS X build to this
|
||||
# GitHub release name as a release asset.
|
||||
#
|
||||
# DEPLOY: Repo setting to deploy (defaults to no deploy to reduce
|
||||
# Travis build times. Set DEPLOY=1 to enable in repo settings.
|
||||
######
|
||||
env:
|
||||
global:
|
||||
- GENERATOR="Unix Makefiles"
|
||||
- CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release}
|
||||
# - FREECAD_RELEASE="0.18"
|
||||
# - DEPLOY_RELEASE=${DEPLOY_RELEASE:-$FREECAD_RELEASE}
|
||||
# - OSX_PORTS_CACHE=${OSX_PORTS_CACHE:-FreeCAD/FreeCAD-ports-cache}
|
||||
# - DEPLOY=${DEPLOY:-0}
|
||||
|
||||
# jobs:
|
||||
# chunk.io key (if needed, obtain it with Yorik, PrzemoF, Kunda1)
|
||||
# secure: MJu0ZU/9Yqut6bUkHoSrXTV/c/WhCLR0KnHKCsnEU081PYoukzH6ngzgKk7/trAH2In080d/ra4B2OmTNl/LAgV6DXKFY9dO1aG8QwcrHgaMPf0pHYUy/OfwQSFYFByQDV2OEMAHcIWc/dtNkzK2QUi44Kn7d0GtSEiN4s816lriWtjg0vmEGAU8MjvcAGss4gKyn05Xm1NUCYPKgpgIHsywLbpE76lv0eOYoosEuKv5Q9Pb4FMQts02+JUlqE8eY4ZZ3nV8iQbgIDdseOSA7Ixn05zWjU/ZRZ74TrYxMnzfUAwQcJe9OcqoESq+pPWQt5HYG66VmeVxQim1gmsiDASH51U/nswKt0Q4bISj3tVk0YZMFV8Ax+SzPvLEmFZJQGfgO1mg7HdNcz9N9G5JHPawrV19DwYIEFbAw8MCSAoIXFOcPQZUWXCbtjm7NO9vCjMrqyVJMDD9L8omvQajHoajuHbOT8KB250gFokeLj3z8yu++Tz+IrZX5inUMrXsARVt/ALXpi8rJPXmoFMpMUjyWmDPqPWlnqUhLtTtEtKpuOWP8ZnWVwkg4QYOUhCy95C1okJSGkG+ylHWncWfY4mS+UBT525laoh+GOhH+sRW+p2xkI21xGFRqg1oHjjgY1yIYF6nnSHPzxMBRYmZwagyXsjkFG5FPMWR2oYk0Yg
|
||||
|
||||
git:
|
||||
depth: 5000
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/479456663cdf5c84e4d8
|
||||
on_success: always
|
||||
on_failure: always
|
||||
on_start: change
|
||||
|
||||
# Inject osx build into matrix - needed to specify image/dist
|
||||
jobs:
|
||||
# allow_failures:
|
||||
# - python: 3.7
|
||||
fast_finish: true # https://blog.travis-ci.com/2013-11-27-fast-finishing-builds
|
||||
include:
|
||||
- if: type != pull_request
|
||||
os: linux
|
||||
dist: bionic
|
||||
language: cpp
|
||||
compiler: clang
|
||||
cache: ccache
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
packages:
|
||||
- clang-10
|
||||
env:
|
||||
- CC=clang-10
|
||||
- CXX=clang++-10
|
||||
- CMAKE_ARGS="-DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON"
|
||||
- CACHE_NAME=JOB1
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
language: cpp
|
||||
compiler: gcc-10
|
||||
cache: ccache
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
packages:
|
||||
- gcc-10
|
||||
- g++-10
|
||||
env:
|
||||
- CC=gcc-10
|
||||
- CXX=g++-10
|
||||
- CC_FOR_BUILD=gcc-10
|
||||
- CXX_FOR_BUILD=g++-10
|
||||
- CMAKE_ARGS="-DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/cc -DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON"
|
||||
- CACHE_NAME=JOB2
|
||||
|
||||
# - os: osx
|
||||
# osx_image: xcode11.6
|
||||
# language: cpp
|
||||
# cache:
|
||||
# - ccache: true
|
||||
# - directories:
|
||||
# - $HOME/.ccache
|
||||
# - $HOME/Library/Caches/Homebrew
|
||||
# - /usr/local/Homebrew
|
||||
# env:
|
||||
# - CMAKE_OPTS="-DBUILD_QT5=ON -DBUILD_ENABLE_CXX_STD='C++17' -DUSE_PYTHON3=1 -DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations' -DBUILD_FEM_NETGEN=1 -DBUILD_FEM=1 -DBUILD_TECHDRAW=0 -DCMAKE_PREFIX_PATH='/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources' -DBUILD_FEM_NETGEN:BOOL=ON -DFREECAD_USE_EXTERNAL_KDL=ON -DCMAKE_BUILD_TYPE=Release"
|
||||
# - PATH=/usr/local/bin:$PATH
|
||||
# - CACHE_NAME=OSX1
|
||||
|
||||
- os: windows
|
||||
language: cpp
|
||||
env:
|
||||
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=OFF -DFREECAD_RELEASE_PDB=OFF -DFREECAD_RELEASE_SEH=OFF"
|
||||
- GENERATOR="Visual Studio 15 2017 Win64"
|
||||
- PYTHON_MAJOR_VERSION=3
|
||||
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
|
||||
- TEST_PATH="C:\Users\travis\build\FreeCAD\FreeCAD\build\bin"
|
||||
- CLCACHE_PATH="C:\Users\travis\build\FreeCAD\FreeCAD"
|
||||
- VS15=true
|
||||
- CCACHE_TEMPDIR=/tmp/.ccache-temp
|
||||
- CCACHE_COMPRESS=1
|
||||
- CCACHE_DIR=$HOME/.ccache
|
||||
- CACHE_NAME=JOB5
|
||||
# enable this if clcache extended log is needed
|
||||
#- CLCACHE_LOG=1
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/clcache
|
||||
|
||||
# - language: python
|
||||
# python: 3.7
|
||||
# dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
|
||||
# before_install: true
|
||||
# install: python3 -m pip install flake8
|
||||
# # fail the build if there are Python syntax errors or undefined names
|
||||
# script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
||||
|
||||
before_cache:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
|
||||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
|
||||
|
||||
before_install:
|
||||
# - eval "$(curl -fsSL "https://raw.githubusercontent.com/${OSX_PORTS_CACHE}/v${FREECAD_RELEASE}/travis-helpers.sh")"
|
||||
- |
|
||||
case "${TRAVIS_OS_NAME}" in
|
||||
|
||||
"linux")
|
||||
# Daily PPA for OCCT, Pivy, Netgen, PySide ... packages
|
||||
sudo apt-add-repository -y ppa:freecad-maintainers/freecad-daily
|
||||
sudo apt-get update -qq
|
||||
# Build deps
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
python-dev \
|
||||
python-pyside \
|
||||
python-matplotlib \
|
||||
python3-dev \
|
||||
python3-pyside \
|
||||
python3-matplotlib \
|
||||
libboost1.65-dev \
|
||||
libboost-filesystem1.65-dev \
|
||||
libboost-program-options1.65-dev \
|
||||
libboost-python1.65-dev \
|
||||
libboost-regex1.65-dev \
|
||||
libboost-signals1.65-dev \
|
||||
libboost-system1.65-dev \
|
||||
libboost-thread1.65-dev \
|
||||
libxerces-c-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libvtk7-dev \
|
||||
libmedc-dev \
|
||||
pybind11-dev \
|
||||
swig \
|
||||
qt4-qmake \
|
||||
libqt4-opengl-dev \
|
||||
libqtwebkit-dev \
|
||||
qtbase5-dev \
|
||||
libqt5xmlpatterns5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5opengl5-dev \
|
||||
qttools5-dev \
|
||||
qtwebengine5-dev \
|
||||
libcoin80-dev \
|
||||
libpyside-dev \
|
||||
libpyside2-dev \
|
||||
libshiboken-dev \
|
||||
libshiboken2-dev \
|
||||
pyside-tools \
|
||||
pyside2-tools \
|
||||
doxygen \
|
||||
graphviz \
|
||||
libnglib-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
libmetis-dev \
|
||||
libspnav-dev
|
||||
# Runtime deps
|
||||
sudo apt-get install -y --no-install-recommends freecad-daily-python3 python-pivy python3-pivy python-ply python3-ply
|
||||
|
||||
# Use newer Eigen to suppress warnings
|
||||
# https://github.com/FreeCAD/FreeCAD/pull/3485
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/universe/e/eigen3/libeigen3-dev_3.3.7-2_all.deb
|
||||
sudo dpkg -i libeigen3-dev_3.3.7-2_all.deb
|
||||
|
||||
export DISPLAY=:99.0
|
||||
sh -e /etc/init.d/xvfb start
|
||||
|
||||
export INSTALLED_APP_PATH="/usr/local/bin/FreeCAD"
|
||||
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/netgen/:$LD_LIRBARY_PATH
|
||||
;;
|
||||
|
||||
"osx")
|
||||
xcodebuild -version -sdk
|
||||
brew --config
|
||||
brew install ccache
|
||||
brew install coreutils
|
||||
brew update >/dev/null
|
||||
brew --config
|
||||
brew update
|
||||
brew upgrade
|
||||
brew install python@3.9
|
||||
brew unlink python@3.8
|
||||
brew link --overwrite --force python@3.9
|
||||
rm /usr/local/bin/python
|
||||
ln -s /usr/local/bin/python3 /usr/local/bin/python
|
||||
pip3 install six
|
||||
pip3 install pyyaml
|
||||
pip3 install ply
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
brew reinstall vtk@8.2
|
||||
brew link --force vtk@8.2
|
||||
which python
|
||||
python --version
|
||||
brew install boost
|
||||
brew install boost-python3
|
||||
brew tap FreeCAD/freecad
|
||||
brew install freecad/freecad/coin
|
||||
brew install freecad/freecad/nglib
|
||||
brew install freecad/freecad/med-file
|
||||
brew install freecad/freecad/opencamlib
|
||||
brew install freecad/freecad/shiboken2
|
||||
brew install freecad/freecad/pyside2
|
||||
brew install freecad/freecad/pyside2-tools
|
||||
brew install freecad/freecad/pivy
|
||||
brew install freecad/freecad/matplotlib
|
||||
|
||||
##Install the 3DConnexion frameworks
|
||||
if [ ! -d /Library/Frameworks/3DconnexionClient.framework ]; then
|
||||
curl -o /tmp/3dFW.dmg -L 'https://download.3dconnexion.com/drivers/mac/10-6-6_360DF97D-ED08-4ccf-A55E-0BF905E58476/3DxWareMac_v10-6-6_r3234.dmg'
|
||||
hdiutil attach -readonly /tmp/3dFW.dmg
|
||||
sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target /
|
||||
diskutil eject /Volumes/3Dconnexion\ Software
|
||||
fi
|
||||
export CMAKE_OPTS="${CMAKE_OPTS} -DFREECAD_CREATE_MAC_APP=OFF"
|
||||
export INSTALLED_APP_PATH="/usr/local/MacOS/FreeCAD"
|
||||
|
||||
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_USE_EXTERNAL_KDL=ON"
|
||||
brew link --overwrite matplotlib
|
||||
if [ -f "/usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx" ]; then
|
||||
sed '1,$s/\[\[nodiscard\]\]//' /usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx > /tmp/Standard_Macro.hxx && cp /tmp/Standard_Macro.hxx /usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx ;
|
||||
fi
|
||||
;;
|
||||
|
||||
"windows")
|
||||
#choco install -y python
|
||||
#py -m pip install --quiet --upgrade pip
|
||||
#py -m pip install git+https://github.com/frerich/clcache.git@v4.2.0
|
||||
curl -L https://github.com/frerich/clcache/releases/download/v4.2.0/clcache-4.2.0.zip --output clcache-4.2.0.zip
|
||||
7z x clcache-4.2.0.zip > /dev/null
|
||||
export PATH=$CLCACHE_PATH:$PATH
|
||||
export PATH=$TEST_PATH:$PATH
|
||||
#reset clcache hit stats
|
||||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -z'
|
||||
# clcache stats before compilation
|
||||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s'
|
||||
|
||||
curl -L https://github.com/FreeCAD/FreeCAD/releases/download/0.19.1/FreeCADLibs_12.5.3_x64_VC17.7z --output FreeCADLibs.7z
|
||||
7z x FreeCADLibs.7z -oFreeCADLibs > /dev/null
|
||||
rm -f FreeCADLibs.7z
|
||||
export FREECAD_LIBPACK_DIR="$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17"
|
||||
|
||||
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_LIBPACK_DIR=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17 -DPYTHON_EXECUTABLE=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17\bin\python.exe \
|
||||
-DBUILD_QT5=TRUE"
|
||||
export PATH=$MSBUILD_PATH:$PATH
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid or unsupported operating system ${TRAVIS_OS_NAME}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
install:
|
||||
####
|
||||
# Build FreeCAD with cmake options set above for each platform
|
||||
##
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/local/bin:/usr/local/opt/ccache/libexec:$PATH"; fi
|
||||
- echo ${CMAKE_ARGS}
|
||||
- mkdir build && cd build && cmake -Wno-dev -G"${GENERATOR}" ${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../
|
||||
|
||||
script:
|
||||
####
|
||||
# Install FreeCAD and run unit tests. Test failures will fail the build
|
||||
##
|
||||
# MSBuild.exe /m FreeCAD.sln
|
||||
- |
|
||||
if [ "${TRAVIS_OS_NAME}" == "windows" ]; then
|
||||
# https://travis-ci.community/t/vcvarsall-bat-freezes-on-new-1809-based-windows-images/7098/6
|
||||
# call msbuild using clcache
|
||||
#cmd.exe //C '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 && MSBuild.exe FreeCAD.sln /p:CLToolExe=clcache.exe /p:TrackFileAccess=false /p:CLToolPath=C:\Users\travis\build\FreeCAD\FreeCAD /m:2 /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=x64'
|
||||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\.travis\build.bat'
|
||||
# ls -lahR
|
||||
mkdir bin/
|
||||
mv ../FreeCADLibs/FreeCADLibs_12.5.3_x64_VC17/bin/* bin/
|
||||
du -hs bin/
|
||||
# show clcache hit stats
|
||||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s'
|
||||
# run the tests
|
||||
#cmd.exe //C 'cd C:\Users\travis\build\FreeCAD\FreeCAD\build\bin && FreeCADCmd.exe --run-test 0'
|
||||
# Make build fail if ANY of the following fails
|
||||
#set -ev
|
||||
winpty.exe -Xallow-non-tty -Xplain /C/Users/travis/build/FreeCAD/FreeCAD/build/bin/FreeCADCmd.exe --run-test 0 | tee runlog.txt
|
||||
grep -q FAILED runlog.txt ; [ $? == 1 ] && echo "Build succeeded and tests passed!" || ( echo "Tests failed!" && false )
|
||||
else
|
||||
# Stop compiling (GCC) after 2 hrs 50 min (3 hrs limit).
|
||||
# Preserves created ccache for the next build job.
|
||||
# if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi
|
||||
# if [ "${TRAVIS_OS_NAME}" == "osx" ]; then sudo gtimeout -s KILL make -j2 install; fi
|
||||
cat $HOME/.ccache/ccache.conf
|
||||
ccache -z -s
|
||||
df -h
|
||||
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then export PATH="/usr/local/opt/ccacche/libexec:$PATH"; sudo gtimeout -s KILL 7200 make -j2; [ $? == 124 ] && { ccache -s; return 0; } fi
|
||||
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi
|
||||
sudo make -j2 install
|
||||
ccache -s
|
||||
${INSTALLED_APP_PATH} --console --run-test 0 || travis_terminate 1
|
||||
${INSTALLED_APP_PATH} --log-file /tmp/FreeCAD_installed.log &
|
||||
sleep 10 && pkill FreeCAD
|
||||
cat /tmp/FreeCAD_installed.log
|
||||
grep --file=../.log_errors /tmp/FreeCAD_installed.log ; [ $? == 1 ] && echo "No errors from .log_errors file found in the log after start from /usr/local/bin" || ( echo "Error from .log_errors found!" && false )
|
||||
fi
|
||||
|
||||
#after_success:
|
||||
# Package and deploy the build to GitHub. This will only run for builds on
|
||||
# master (i.e. pull requests are only built and tested but not deployed).
|
||||
#
|
||||
# GH_TOKEN must be set in order to deploy releases to GitHub
|
||||
#
|
||||
#- |
|
||||
# if [ "${TRAVIS_OS_NAME}" == "osx" -a "${TRAVIS_PULL_REQUEST}" == "false" -a "${DEPLOY}" == "1" ]; then
|
||||
# brew ls --versions jq || brew install jq
|
||||
# npm install -g appdmg
|
||||
# export VSN=$(python ${TRAVIS_BUILD_DIR}/src/Tools/ArchiveNameFromVersionHeader.py ${TRAVIS_BUILD_DIR}/build/src/Build/Version.h)
|
||||
# export DEPLOYMENT_ARCHIVE=${VSN}-${QT}.dmg
|
||||
# appdmg ${TRAVIS_BUILD_DIR}/src/MacAppBundle/DiskImage/layout.json "${DEPLOYMENT_ARCHIVE}"
|
||||
# deployContext=$(create_helper_context repo=${TRAVIS_REPO_SLUG} auth_token=${GH_TOKEN} release=${DEPLOY_RELEASE})
|
||||
# gitHub_deploy_asset_to_release_named $deployContext ${DEPLOYMENT_ARCHIVE}
|
||||
# gitHub_prune_assets_for_release_named $deployContext "-${QT}" 1
|
||||
# fi
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
echo on
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
|
||||
MSBuild.exe FreeCAD.sln /p:CLToolExe=clcache.exe /p:TrackFileAccess=false /p:CLToolPath=C:\Users\travis\build\FreeCAD\FreeCAD /m:2 /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=x64
|
||||
|
||||
@@ -222,7 +222,7 @@ cmake \
|
||||
-DBUILD_FEM=1 \
|
||||
-DBUILD_TECHDRAW=0 \
|
||||
-DFREECAD_USE_EXTERNAL_KDL=ON \
|
||||
-DFREECAD_CREATE_MAC_APP=OFF \
|
||||
-DFREECAD_CREATE_MAC_APP=OFF
|
||||
-DCMAKE_PREFIX_PATH="/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources;/usr/local/opt/vtk@8.2/lib/cmake;/usr/local;" .
|
||||
```
|
||||
|
||||
@@ -294,6 +294,6 @@ mv freecadd freecad;
|
||||
|
||||
[lnk1]: <http://brew.sh>
|
||||
[lnk2]: <https://github.com/FreeCAD/homebrew-freecad>
|
||||
[lnk3]: <https://forum.freecad.org/viewtopic.php?f=4&t=51981#p446796>
|
||||
[lnk3]: <https://forum.freecadweb.org/viewtopic.php?f=4&t=51981#p446796>
|
||||
[lnk4]: <https://gist.github.com/ipatch/6116824ab1f2a99b526cb07e43317b91#gistcomment-3577066>
|
||||
[lnk5]: <https://github.com/Homebrew/homebrew-core/pull/67615>
|
||||
@@ -1,7 +1,5 @@
|
||||
# As of January 2023 we require CMake 3.16.3
|
||||
# see https://forum.freecad.org/viewtopic.php?f=10&t=72173
|
||||
# for further info why
|
||||
cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR)
|
||||
# March 2021, the oldest we have to support : Ununtu 18.04 LTS
|
||||
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
|
||||
|
||||
# policy CMP0072 was introduced with CMake 3.11
|
||||
# relates to FindOpenGL module
|
||||
@@ -10,29 +8,22 @@ if (POLICY CMP0072)
|
||||
set(OpenGL_GL_PREFERENCE LEGACY)
|
||||
endif(POLICY CMP0072)
|
||||
|
||||
# FindPythonInterp and FindPythonLibs modules are deprecated.
|
||||
# Currently, they are still used by shiboken's CMake files
|
||||
if (POLICY CMP0148)
|
||||
cmake_policy(SET CMP0148 OLD)
|
||||
endif()
|
||||
|
||||
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
|
||||
|
||||
if(FREECAD_USE_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
|
||||
if(CCACHE_PROGRAM)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
|
||||
if(CCACHE_PROGRAM)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
|
||||
project(FreeCAD)
|
||||
|
||||
set(PACKAGE_VERSION_MAJOR "1")
|
||||
set(PACKAGE_VERSION_MINOR "0")
|
||||
set(PACKAGE_VERSION_PATCH "0") # 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)
|
||||
set(PACKAGE_VERSION_NAME "Vulcan")
|
||||
set(PACKAGE_VERSION_MAJOR "0")
|
||||
set(PACKAGE_VERSION_MINOR "21")
|
||||
set(PACKAGE_VERSION_PATCH "0")
|
||||
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
|
||||
|
||||
set(FREECAD_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
|
||||
set(FREECAD_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
|
||||
set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}")
|
||||
|
||||
@@ -51,9 +42,7 @@ InitializeFreeCADBuildOptions()
|
||||
CheckInterModuleDependencies()
|
||||
FreeCADLibpackChecks()
|
||||
SetupDoxygen()
|
||||
SetupLibFmt()
|
||||
SetupYamlCpp()
|
||||
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIBPACK_CHECKFILE_VERSION)
|
||||
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
SetupPython()
|
||||
SetupPCL()
|
||||
SetupPybind11()
|
||||
@@ -67,8 +56,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)
|
||||
@@ -87,7 +76,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)
|
||||
@@ -103,18 +92,4 @@ BuildAndInstallDesignerPlugin()
|
||||
|
||||
CreatePackagingTargets()
|
||||
|
||||
if(MSVC AND FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
|
||||
CopyLibpackDirectories()
|
||||
endif()
|
||||
|
||||
if (ENABLE_DEVELOPER_TESTS)
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
PrintFinalReport()
|
||||
|
||||
message("\n=================================================\n"
|
||||
"Now run 'cmake --build ${CMAKE_BINARY_DIR}' to build ${PROJECT_NAME}\n"
|
||||
"=================================================\n")
|
||||
|
||||
@@ -1,301 +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": {
|
||||
"Boost_NO_BOOST_CMAKE": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"BUILD_DYNAMIC_LINK_PYTHON": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"USE_BOOST_PYTHON": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conda-linux",
|
||||
"hidden": true,
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
|
||||
"cacheVariables": {
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/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": "${sourceDir}/.conda/freecad/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/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": "${sourceDir}/.conda/freecad/Library/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -55,8 +55,8 @@ further defined and clarified by project maintainers.
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting any of the community admins or moderators at
|
||||
https://forum.freecad.org/memberlist.php?mode=team . All
|
||||
reported by contacting any of the community admins or moderators at
|
||||
https://forum.freecadweb.org/memberlist.php?mode=team . All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
# FreeCAD Contribution Process (FCP)
|
||||
|
||||
FreeCAD's contribution process is inspired by the Collective Code Construction Contract which itself is an evolution of the github.com Fork and Pull Model.
|
||||
|
||||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
|
||||
|
||||
|
||||
## 0. Status
|
||||
|
||||
FreeCAD is in a transition period. The following are to be regarded as GUIDELINES for contribution submission and acceptance. For historical reasons, the actual process MAY diverge from this process during the transition. Such deviations SHOULD be noted and discussed whenever possible.
|
||||
|
||||
## 1. Goals
|
||||
|
||||
The FreeCAD Contribution Process is expressed here with the following specific goals in mind:
|
||||
|
||||
1. To provide transparency and fairness in the contribution process.
|
||||
2. To allow contributions to be included as quickly as possible.
|
||||
3. To preserve and improve the code quality while encouraging appropriate experimentation and risk-taking.
|
||||
4. To minimize dependence on individual Contributors by encouraging a large pool of active Contributors.
|
||||
5. To be inclusive of many viewpoints and to harness a diverse set of skills.
|
||||
6. To provide an encouraging environment where Contributors learn and improve their skills.
|
||||
7. To protect the free and open nature of the FreeCAD project.
|
||||
|
||||
## 2. Fundamentals
|
||||
|
||||
1. FreeCAD uses the git distributed revision control system.
|
||||
2. Source code for the main application and related subprojects is hosted on github.com in the FreeCAD organization.
|
||||
3. Problems are discrete, well-defined limitations or bugs.
|
||||
4. FreeCAD uses GitHub's issue-tracking system to track problems and contributions. For help requests and general discussions, use the project forum.
|
||||
5. Contributions are sets of code changes that resolve a single problem.
|
||||
6. FreeCAD uses the Pull Request workflow for evaluating and accepting contributions.
|
||||
|
||||
## 3. Roles
|
||||
1. "User": A member of the wider FreeCAD community who uses the software.
|
||||
2. "Contributor": A person who submits a contribution that resolves a previously identified problem. Contributors do not have commit access to the repository unless they are also Maintainers. Everyone, without distinction or discrimination, SHALL have an equal right to become a Contributor.
|
||||
3. "Maintainer": A person who merges contributions. Maintainers may or may not be Contributors. Their role is to enforce the process. Maintainers have commit access to the repository.
|
||||
4. "Administrator": Administrators have additional authority to maintain the list of designated Maintainers.
|
||||
|
||||
## 4. Licensing, Ownership, and Credit
|
||||
1. FreeCAD is distributed under the Lesser General Public License, version 2, or superior (LGPL2+). Additional details can be found in the LICENSE file.
|
||||
2. All contributions to FreeCAD MUST use a compatible license.
|
||||
3. All contributions are owned by their authors unless assigned to another.
|
||||
4. FreeCAD does not have a mandatory copyright assignment policy.
|
||||
5. A Contributor who wishes to be identified in the Credits section of the application "About" dialog is responsible for identifying themselves. They should modify the Contributors file and submit a PR with a single commit for this modification only. The contributors file is found at https://github.com/FreeCAD/FreeCAD/blob/main/src/Doc/CONTRIBUTORS
|
||||
6. A contributor who does not wish to assume the copyright of their contribution MAY choose to assign it to the [FreeCAD project association](https://fpa.freecad.org) by mentioning **Copyright (c) 2022 The FreeCAD project association <fpa@freecad.org>** in the file's license code block.
|
||||
|
||||
## 5. Contribution Requirements
|
||||
|
||||
1. Contributions are submitted in the form of Pull Requests (PR).
|
||||
2. Maintainers and Contributors MUST have a GitHub account and SHOULD use their real names or a well-known alias.
|
||||
3. If the GitHub username differs from the username on the FreeCAD Forum, effort SHOULD be taken to avoid confusion.
|
||||
4. A PR SHOULD be a minimal and accurate answer to exactly one identified and agreed-on problem.
|
||||
5. A PR SHOULD refrain from adding additional dependencies to the FreeCAD project unless no other option is available.
|
||||
6. Code submissions MUST adhere to the code style guidelines of the project if these are defined.
|
||||
7. If a PR contains multiple commits, each commit MUST compile cleanly when merged with all previous commits of the same PR. Each commit SHOULD add value to the history of the project. Checkpoint commits SHOULD be squashed.
|
||||
8. A PR SHALL NOT include non-trivial code from other projects unless the Contributor is the original author of that code.
|
||||
9. A PR MUST compile cleanly and pass project self-tests on all target platforms.
|
||||
10. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
|
||||
11. The PR message MUST consist of a single short line, the PR Title, summarizing the problem being solved, followed by a blank line and then the proposed solution in the Body. If a PR consists of more than one commit, the PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
|
||||
12. A “Valid PR” is one which satisfies the above requirements.
|
||||
|
||||
## 6. Process
|
||||
|
||||
1. Change on the project follows the pattern of accurately identifying problems and applying minimal, accurate solutions to these problems.
|
||||
2. To request changes, a User logs an issue on the project GitHub issue tracker.
|
||||
3. The User or Contributor SHOULD write the issue by describing the problem they face or observe. Links to the forum or other resources are permitted but the issue SHOULD be complete and accurate and SHOULD NOT require the reader to visit the forum or any other platform to understand what is being described.
|
||||
4. Issue authors SHOULD strive to describe the minimum acceptable condition.
|
||||
5. Issue authors SHOULD focus on User tasks and avoid comparisons to other software solutions.
|
||||
6. The User or Contributor SHOULD seek consensus on the accuracy of their observation and the value of solving the problem.
|
||||
7. To submit a solution to a problem, a Contributor SHALL create a pull request back to the project.
|
||||
8. Contributors and Maintainers SHALL NOT commit changes directly to the target branch.
|
||||
9. To discuss a proposed solution, Users MAY comment on the Pull Request in GitHub. Forum conversations regarding the solution SHOULD be discouraged and conversation redirected to the Pull Request or the related issue.
|
||||
10. To accept or reject a Pull Request, a Maintainer SHALL use GitHub's interface.
|
||||
11. Maintainers SHOULD NOT merge their own PRs except:
|
||||
1. in exceptional cases, such as non-responsiveness from other Maintainers for an extended period.
|
||||
2. If the Maintainer is also the primary developer of the workbench or subsystem.
|
||||
|
||||
12. Maintainers SHALL merge valid PRs from other Contributors rapidly.
|
||||
13. Maintainers MAY, at their discretion merge PRs that have not met all criteria to be considered valid to:
|
||||
1. end fruitless discussions
|
||||
2. capture toxic contributions in the historical record
|
||||
3. engage with the Contributor on improving their contribution quality.
|
||||
14. Maintainers SHALL NOT make value judgments on correct contributions.
|
||||
15. Any Contributor who has value judgments on a PR SHOULD express these via their own PR.
|
||||
16. The User who created an issue SHOULD close the issue after checking the PR is successful.
|
||||
17. Maintainers SHOULD close issues that are left open without action or update for an unreasonable period.
|
||||
|
||||
## 7. Branches and Releases
|
||||
|
||||
1. The project SHALL have one branch (“main”) that always holds the latest in-progress version and SHOULD always build.
|
||||
2. The project SHALL NOT use topic branches for any reason. Personal forks MAY use topic branches.
|
||||
3. To make a stable release a Maintainer SHALL tag the repository. Stable releases SHALL always be released from the repository main branch.
|
||||
|
||||
## 8. Project Administration
|
||||
|
||||
1. Project Administrators are those individuals who are members of the FreeCAD Github organization and have the role of 'owner'. They have the task of administering the organization including adding and removing individuals from various teams.
|
||||
2. Project Administrator is a technical role necessitated by the GitHub platform. Except for the specific exceptions listed below, the Project Administrators do not make the decision about individual team members. Rather, they carry out the collective wishes of the Maintainers team. Project Administrators will be selected from the Maintainers team by the Maintainers themselves.
|
||||
3. To ensure continuity there SHALL be at least four Project Administrators at all times.
|
||||
4. The project Administrators will manage the set of project Maintainers. They SHALL maintain a sufficiently large pool of Maintainers to ensure their succession and permit timely review of contributions. If the pool of Maintainers is insufficient, the Project Administrators will request that the Maintainers select additional individuals to add.
|
||||
5. Contributors who have a history of successful PRs and have demonstrated continued professionalism should be invited to be Maintainers.
|
||||
6. Administrators SHOULD remove Maintainers who are inactive for an extended period, or who repeatedly fail to apply this process accurately.
|
||||
7. The list of Maintainers SHALL be publicly accessible and reflective of current activity on the project.
|
||||
8. Administrators SHALL act expediently to protect the FreeCAD infrastructure and resources.
|
||||
9. Administrators SHOULD block or ban “bad actors” who cause stress, animosity, or confusion to others in the project. This SHOULD be done after public discussion, with a chance for all parties to speak. A bad actor is someone who repeatedly ignores the rules and culture of the project, who is hostile or offensive, who impedes the productive exchange of information, and who is unable to self-correct their behavior when asked to do so by others.
|
||||
|
After Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,55 @@
|
||||
#ifndef LIBRARY_VERSIONS_H
|
||||
#define LIBRARY_VERSIONS_H
|
||||
|
||||
/* LibraryVersions.h. Generated from LibraryVersions.h.cmake by cmake. */
|
||||
|
||||
#cmakedefine HAVE_OCC_VERSION
|
||||
|
||||
#if defined(HAVE_OCC_VERSION)
|
||||
# include <${OCC_INCLUDE_DIR}/Standard_Version.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
/* No need for Boost (version info is always included in the source) */
|
||||
/* No need for Python (version info is always included in the source) */
|
||||
/* No need for Qt (version info is always included in the source) */
|
||||
/* No need for zlib (version info is always included in the source) */
|
||||
|
||||
// No CMake version info for SMESH, libarea, Zipios, or KDL
|
||||
|
||||
// Coin3D
|
||||
constexpr char * FC_COIN3D_VERSION = "${COIN3D_VERSION}";
|
||||
|
||||
// Eigen3
|
||||
constexpr char * FC_EIGEN3_VERSION = "${EIGEN3_VERSION}";
|
||||
|
||||
// FreeType
|
||||
constexpr char * FC_FREETYPE_VERSION = "${FREETYPE_VERSION_STRING}";
|
||||
|
||||
// pcl
|
||||
constexpr char * FC_PCL_VERSION = "${PCL_VERSION}";
|
||||
|
||||
// PyCXX
|
||||
constexpr char * FC_PYCXX_VERSION = "${PYCXX_VERSION}";
|
||||
|
||||
// PySide
|
||||
constexpr char * FC_PYSIDE_VERSION = "${PySide2_VERSION}";
|
||||
|
||||
// PyBind
|
||||
constexpr char * FC_PYBIND11_VERSION = "${pybind11_VERSION}";
|
||||
|
||||
// Shiboken
|
||||
constexpr char * FC_SHIBOKEN_VERSION = "${Shiboken2_VERSION}";
|
||||
|
||||
// vtk
|
||||
constexpr char * FC_VTK_VERSION = "${VTK_VERSION}";
|
||||
|
||||
// Xerces-C
|
||||
constexpr char * FC_XERCESC_VERSION = "${XercesC_VERSION}";
|
||||
|
||||
// Pivy
|
||||
constexpr char * FC_PIVY_VERSION = "${PIVY_VERSION}";
|
||||
|
||||
|
||||
#endif // LIBRARY_VERSIONS_H
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,18 +1,60 @@
|
||||
<a href="https://freecad.org"><img src="/src/Gui/Icons/freecad.svg" height="100px" width="100px"></a>
|
||||
<h6 align="center"><img src="FreeCAD-toponaming-logo.png"/></h6>
|
||||
|
||||
### Your own 3D parametric modeler
|
||||
<h1 align="center">FreeCAD Topological Naming (toponaming) Branch</h1>
|
||||
|
||||
[Website](https://www.freecad.org) •
|
||||
[Documentation](https://wiki.freecad.org) •
|
||||
[Forum](https://forum.freecad.org/) •
|
||||
[Bug tracker](https://github.com/FreeCAD/FreeCAD/issues) •
|
||||
[Git repository](https://github.com/FreeCAD/FreeCAD) •
|
||||
[Blog](https://blog.freecad.org)
|
||||
### About
|
||||
|
||||
This branch is dedicated to integrating code that improves the [topological naming problem](https://wiki.freecad.org/Topological_naming_problem) in FreeCAD. There have been several attempts to address it over the years within FreeCAD. In reality, toponaming is an issue that no modern CAD software is fully immune to. This is because the solutions are complex.
|
||||
|
||||
Thanks to an independent developer named Zheng Lei ('realthunder'), who has gone the farthest in the effort of fixing toponaming in FreeCAD, and has provided a proof of concept fix in his own branch named 'Link' branch.
|
||||
|
||||
* [@Realthunder](https://github.com/realthunder)'s Link branch: https://github.com/realthunder/FreeCAD
|
||||
* Official FreeCAD main ('master') branch: https://github.com/FreeCAD/FreeCAD/
|
||||
* Official FreeCAD toponaming git repository: https://github.com/FreeCAD/FreeCAD/tree/development/toponaming
|
||||
|
||||
|
||||
[](https://github.com/freecad/freecad/releases/latest) [](https://crowdin.com/project/freecad) [](https://liberapay.com/FreeCAD)
|
||||
### Objective
|
||||
|
||||
<img src="/.github/images/partdesign.png" width="800"/>
|
||||
Per the FreeCAD developer meetings that occurred during the pre-release of v0.20, 'toponaming' was identified as one of the main targets for merge in the v0.21/v1.0 release cycle.
|
||||
|
||||
### Contributing
|
||||
|
||||
During this development cycle there will be nightly builds provided for testers to test and report results back to the developers.
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Expand this section to learn about testing toponaming on different platforms/distros</summary>
|
||||
|
||||
#### Linux
|
||||
|
||||
##### Snap packages
|
||||
A nightly Snap package of the 'toponaming' branch will be available to testers. Refer to the [Snap wiki page](https://wiki.freecad.org/Ubuntu_Snap#Notes)
|
||||
|
||||
#### Windows
|
||||
|
||||
TBD
|
||||
|
||||
#### macOS
|
||||
|
||||
TBD
|
||||
|
||||
#### FreeBSD
|
||||
|
||||
N/A
|
||||
|
||||
</details>
|
||||
|
||||
<!--
|
||||
[Website](https://www.freecadweb.org) •
|
||||
[Documentation](https://wiki.freecadweb.org) •
|
||||
[Forum](https://forum.freecadweb.org/) •
|
||||
[Bug tracker](https://www.freecadweb.org/tracker/) •
|
||||
[Git repository](https://github.com/FreeCAD/FreeCAD)
|
||||
|
||||
|
||||
[](https://github.com/freecad/freecad/releases/latest) [![Master][freecad-master-status]][gitlab-branch-master] [](https://crowdin.com/project/freecad) [](https://gitter.im/freecad/freecad?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:python) [](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:cpp) [](https://liberapay.com/FreeCAD)
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/1828501/174066870-1692005b-f8d7-43fb-a289-6d2f07f73d7f.png" width="800"/>
|
||||
|
||||
Overview
|
||||
--------
|
||||
@@ -51,7 +93,20 @@ software center application.
|
||||
|
||||
For development releases check the [weekly-builds page](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds).
|
||||
|
||||
Other options are described at the [wiki Download page](https://wiki.freecad.org/Download).
|
||||
Other options are described at the [wiki Download page](https://wiki.freecadweb.org/Download).
|
||||
|
||||
Build Status
|
||||
------------
|
||||
|
||||
| Master | 0.20 | Translation |
|
||||
|:------:|:----:|:-----------:|
|
||||
|[![Master][freecad-master-status]][gitlab-branch-master]|[![0.20][freecad-0.20-status]][gitlab-branch-0.20]|[](https://crowdin.com/project/freecad)|
|
||||
|
||||
[freecad-0.20-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/releases/FreeCAD-0-20/pipeline.svg
|
||||
[freecad-master-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/master/pipeline.svg
|
||||
[gitlab-branch-0.20]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/releases/FreeCAD-0-20
|
||||
[gitlab-branch-master]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/master
|
||||
[travis-builds]: https://travis-ci.org/FreeCAD/FreeCAD/builds
|
||||
|
||||
Compiling
|
||||
---------
|
||||
@@ -66,37 +121,28 @@ you will usually have to compile them yourself.
|
||||
|
||||
The pages below contain up-to-date build instructions:
|
||||
|
||||
- [Linux](https://wiki.freecad.org/Compile_on_Linux)
|
||||
- [Windows](https://wiki.freecad.org/Compile_on_Windows)
|
||||
- [macOS](https://wiki.freecad.org/Compile_on_MacOS)
|
||||
- [Cygwin](https://wiki.freecad.org/Compile_on_Cygwin)
|
||||
- [MinGW](https://wiki.freecad.org/Compile_on_MinGW)
|
||||
- [Linux](https://wiki.freecadweb.org/Compile_on_Linux)
|
||||
- [Windows](https://wiki.freecadweb.org/Compile_on_Windows)
|
||||
- [macOS](https://wiki.freecadweb.org/Compile_on_MacOS)
|
||||
- [Cygwin](https://wiki.freecadweb.org/Compile_on_Cygwin)
|
||||
- [MinGW](https://wiki.freecadweb.org/Compile_on_MinGW)
|
||||
|
||||
|
||||
Reporting Issues
|
||||
---------
|
||||
|
||||
To report an issue please:
|
||||
|
||||
- Consider posting to the [Forum](https://forum.freecad.org), [Discord](https://discord.com/invite/F4hdxzYZfc) channel, or [Reddit](https://www.reddit.com/r/FreeCAD) to verify the issue;
|
||||
- Search the existing [issues](https://github.com/FreeCAD/FreeCAD/issues) for potential duplicates;
|
||||
- Use the most updated stable or [development versions](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds) of FreeCAD;
|
||||
- Post version info from e.g. `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Start recording a macro `Macro > Macro recording...` and repeat all steps. Stop recording after the issue occurs and upload the saved macro or copy the macro code in the issue;
|
||||
- First post to forum to verify the issue;
|
||||
- Link forum thread to bug tracker ticket and vice-a-versa;
|
||||
- Use the most updated stable or development versions of FreeCAD;
|
||||
- Post version info from eg. `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Post a Step-By-Step explanation on how to recreate the issue;
|
||||
- Upload an example file (FCStd as ZIP file) to demonstrate the problem;
|
||||
- Upload an example file to demonstrate problem.
|
||||
|
||||
For more detail see:
|
||||
|
||||
- [Bug Tracker](https://github.com/FreeCAD/FreeCAD/issues)
|
||||
- [Reporting Issues and Requesting Features](https://github.com/FreeCAD/FreeCAD/issues/new/choose)
|
||||
- [Contributing](https://github.com/FreeCAD/FreeCAD/blob/main/CONTRIBUTING.md)
|
||||
- [Help Forum](https://forum.freecad.org/viewforum.php?f=3)
|
||||
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
|
||||
|
||||
The [FPA](https://fpa.freecad.org) offers developers the opportunity
|
||||
to apply for a grant to work on projects of their choosing. Check
|
||||
[jobs and funding](https://blog.freecad.org/jobs/) to know more.
|
||||
- [Wiki Page about the Bug Tracker](https://wiki.freecadweb.org/Tracker)
|
||||
- [Bug Tracker](https://tracker.freecadweb.org)
|
||||
- [Help Forum](https://forum.freecadweb.org/viewforum.php?f=3)
|
||||
|
||||
|
||||
Usage & Getting help
|
||||
@@ -106,14 +152,14 @@ The FreeCAD wiki contains documentation on
|
||||
general FreeCAD usage, Python scripting, and development. These
|
||||
pages might help you get started:
|
||||
|
||||
- [Getting started](https://wiki.freecad.org/Getting_started)
|
||||
- [Features list](https://wiki.freecad.org/Feature_list)
|
||||
- [Frequent questions](https://wiki.freecad.org/FAQ/en)
|
||||
- [Workbenches](https://wiki.freecad.org/Workbenches)
|
||||
- [Scripting](https://wiki.freecad.org/Power_users_hub)
|
||||
- [Development](https://wiki.freecad.org/Developer_hub)
|
||||
- [Getting started](https://wiki.freecadweb.org/Getting_started)
|
||||
- [Features list](https://wiki.freecadweb.org/Feature_list)
|
||||
- [Frequent questions](https://wiki.freecadweb.org/FAQ/en)
|
||||
- [Workbenches](https://wiki.freecadweb.org/Workbenches)
|
||||
- [Scripting](https://wiki.freecadweb.org/Power_users_hub)
|
||||
- [Development](https://wiki.freecadweb.org/Developer_hub)
|
||||
|
||||
The [FreeCAD forum](https://forum.freecad.org) is also a great place
|
||||
The [FreeCAD forum](https://forum.freecadweb.org) is also a great place
|
||||
to find help and solve specific problems you might encounter when
|
||||
learning to use FreeCAD.
|
||||
|
||||
@@ -123,3 +169,5 @@ learning to use FreeCAD.
|
||||
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="91px">
|
||||
</a> and <a href="https://www.kipro-pcb.com/">KiCad Services Corp.</a>
|
||||
</p>
|
||||
|
||||
-->
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
The FreeCAD project is a FOSS (Free and Open-Source Software) project that has a community of thousands of users and
|
||||
hundreds of developers worldwide. We encourage responsible reporting of security vulnerabilities that may affect users
|
||||
of this software, and will endeavor to address these vulnerabilities when they are discovered.
|
||||
|
||||
## Bounties
|
||||
|
||||
FreeCAD does not have a program to pay bounties for security bugs. If you discover a vulnerability that affects a part
|
||||
of the FreeCAD project (either directly in FreeCAD, in a library it depends on, or in any of the various other
|
||||
subprojects such as our website, forums, etc.) we ask you to join the large community of volunteer contributors and
|
||||
file a report about the issue.
|
||||
|
||||
Note that funds may be available from the [FreeCAD Project Association (FPA)](https://fpa.freecad.org) to pursue
|
||||
security research and/or the development of fixes to any vulnerabilities discovered. However, vulnerabilities held as
|
||||
hostage in demands for "bounties" will not be entertained. Contact the FPA at fpa@freecad.org for more information.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
FreeCAD implements security fixes to the current release series, and to the current development on the master branch.
|
||||
|
||||
| Version | Supported |
|
||||
|---------| ------------------ |
|
||||
| 0.22dev | :white_check_mark: |
|
||||
| 0.21 | :white_check_mark: |
|
||||
| < 0.21 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability use GitHub's security reporting tool:
|
||||
https://github.com/FreeCAD/FreeCAD/security/advisories/new
|
||||
|
||||
@@ -9,6 +9,4 @@
|
||||
#define SMESH_VERSION_PATCH ${SMESH_VERSION_PATCH}
|
||||
#define SMESH_VERSION_TWEAK ${SMESH_VERSION_TWEAK}
|
||||
|
||||
#define SMESH_VERSION_STR "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}"
|
||||
|
||||
#endif // SMESH_VERSION_H
|
||||
@@ -0,0 +1,66 @@
|
||||
#version:
|
||||
|
||||
image: Visual Studio 2017
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
# APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
||||
generator: "Visual Studio 15 2017 Win64"
|
||||
ARCH: "Win64"
|
||||
Compiler: "MSVC2017"
|
||||
|
||||
cache: c:\users\appveyor\clcache -> appveyor.yml
|
||||
|
||||
configuration:
|
||||
#- Debug
|
||||
- Release
|
||||
|
||||
clone_depth: 1600
|
||||
|
||||
# scripts that are called at very beginning, before repo cloning
|
||||
#init:
|
||||
|
||||
#before_build:
|
||||
|
||||
# scripts that run after cloning repository
|
||||
#todo cleanup libpacks on the FreeCAD-ports-cache repo
|
||||
install:
|
||||
- cd C:\projects\freecad
|
||||
- if [%ARCH%] == [Win64] (appveyor DownloadFile https://github.com/apeltauer/FreeCAD/releases/download/LibPack_12.1/FreeCADLibs_12.1.2_x64_VC15.7z)
|
||||
- if [%ARCH%] == [Win64] (
|
||||
powershell -Command 7z x FreeCADLibs_12.1.2_x64_VC15.7z -oFreeCADLibs > nul &&
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat")
|
||||
- set PATH=c:\Python37;c:\Python37\Scripts;%PATH%
|
||||
- pip install clcache
|
||||
- clcache -z
|
||||
- clcache -s
|
||||
|
||||
build_script:
|
||||
- cd C:\projects\freecad
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DFREECAD_LIBPACK_DIR=C:\projects\freecad\FreeCADLibs
|
||||
-DBUILD_FEM_NETGEN=OFF
|
||||
-DFREECAD_RELEASE_PDB=OFF
|
||||
-G "%generator%" ..
|
||||
- mkdir bin
|
||||
- xcopy C:\projects\freecad\FreeCADLibs\bin C:\projects\freecad\build\bin /E /Q
|
||||
- ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache)
|
||||
- msbuild FreeCAD.sln /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /p:CLToolPath=c:\Python37\Scripts\ /m
|
||||
- ps: fsutil behavior set disablelastaccess 1
|
||||
- clcache -s
|
||||
|
||||
#after_build:
|
||||
- cd C:\projects\freecad\build\bin\
|
||||
- FreeCADCmd.exe --run-test 0
|
||||
|
||||
#artifacts:
|
||||
|
||||
test: off # to avoid discovering tests
|
||||
|
||||
#
|
||||
# The following section automatically uploads artifacts
|
||||
# whenever a tag is created on the master branch.
|
||||
#
|
||||
#deploy:
|
||||
@@ -0,0 +1,91 @@
|
||||
##!/usr/bin/env bash
|
||||
#
|
||||
# MacOS Build Script for FreeCAD using Conda.
|
||||
# This is intended for developer use.
|
||||
#
|
||||
# Copyright (c) 2020 by Jeffrey Zampieron. All rights reserved.
|
||||
#
|
||||
# License: LGPLv2.1
|
||||
#
|
||||
# References:
|
||||
# - Conda: https://conda.io/projects/conda/en/latest/user-guide/install/index.html
|
||||
# - Conda Build: https://docs.conda.io/projects/conda-build/en/latest/install-conda-build.html
|
||||
|
||||
###########################################################################
|
||||
# Script wide setup.
|
||||
###########################################################################
|
||||
# The Conda environment name
|
||||
FCENV=freecad_dev
|
||||
# The cmake build directory
|
||||
HOST=$(uname)
|
||||
|
||||
###########################################################################
|
||||
# Env Checks
|
||||
###########################################################################
|
||||
if [[ ${HOST} =~ "Linux" ]]; then
|
||||
# Linux specific checks here
|
||||
echo "Linux specific checks..."
|
||||
elif [[ ${HOST} =~ "Darwin" ]]; then
|
||||
# OSX specific checks here.
|
||||
echo "OS X specific checks..."
|
||||
which xcrun
|
||||
if [ $? != 0 ]; then
|
||||
echo "xcrun not found... install XCode command line tools..."
|
||||
echo "using: xcode-select --install"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "unknown host env... probably won't work. Aborting build."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###########################################################################
|
||||
# Conda Setup
|
||||
###########################################################################
|
||||
which conda
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to find conda executable. Please install."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${CONDA_DEFAULT_ENV}" =~ "${FCENV}" ]]; then
|
||||
echo "Already in env"
|
||||
elif [[ -z "${CONDA_DEFAULT_ENV}" ]]; then
|
||||
echo "Not in conda env... activating"
|
||||
eval "$(conda shell.bash hook)"
|
||||
conda activate ${FCENV}
|
||||
else
|
||||
# Assume we are in some other env.
|
||||
echo "In ${CONDA_DEFAULT_ENV}, attempting switch to ${FCENV}"
|
||||
eval "$(conda shell.bash hook)"
|
||||
conda deactivate
|
||||
conda activate ${FCENV}
|
||||
fi
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to activate conda env: ${FCENV} ... creating"
|
||||
|
||||
if [[ ${HOST} =~ "Linux" ]]; then
|
||||
echo "Linux"
|
||||
conda env create -f environment-linux.yml
|
||||
elif [[ ${HOST} =~ "Darwin" ]]; then
|
||||
echo "OS X"
|
||||
conda env create -f environment-osx.yml
|
||||
else
|
||||
echo "Unknown Host: ${HOST}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
conda activate ${FCENV}
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to create conda environment and activate it."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${CONDA_PREFIX}" ]; then
|
||||
echo "Failed to find CONDA_PREFIX variable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PREFIX="${CONDA_PREFIX}" ./conda/build.sh
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
# Try to find Coin3D
|
||||
# Once done this will define
|
||||
#
|
||||
# COIN3D_FOUND - system has Coin3D - Open Inventor
|
||||
# COIN3D_INCLUDE_DIRS - where the Inventor include directory can be found
|
||||
# COIN3D_LIBRARIES - Link this to use Coin3D
|
||||
#
|
||||
|
||||
SET( COIN3D_FOUND "NO" )
|
||||
|
||||
IF (WIN32)
|
||||
IF (CYGWIN OR MINGW)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
${CMAKE_INCLUDE_PATH}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/include/coin
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
ELSE (CYGWIN OR MINGW)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY_DEBUG coin2d
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY_RELEASE
|
||||
NAMES
|
||||
coin2
|
||||
Coin4
|
||||
PATHS
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
IF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
SET(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
|
||||
debug ${COIN3D_LIBRARY_DEBUG})
|
||||
ELSE (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
IF (COIN3D_LIBRARY_DEBUG)
|
||||
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG})
|
||||
ENDIF (COIN3D_LIBRARY_DEBUG)
|
||||
IF (COIN3D_LIBRARY_RELEASE)
|
||||
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE})
|
||||
ENDIF (COIN3D_LIBRARY_RELEASE)
|
||||
ENDIF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
|
||||
IF (COIN3D_LIBRARIES)
|
||||
# ADD_DEFINITIONS ( -DCOIN_NOT_DLL )
|
||||
#ELSE (COIN3D_LIBRARIES)
|
||||
# SET (COIN3D_LIBRARIES coin2d CACHE STRING "Coin3D Library (Debug) - Open Inventor API")
|
||||
ENDIF (COIN3D_LIBRARIES)
|
||||
|
||||
ENDIF (CYGWIN OR MINGW)
|
||||
|
||||
ELSE (WIN32)
|
||||
IF(APPLE)
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
/Library/Frameworks/Inventor.framework/Headers
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
/Library/Frameworks/Inventor.framework/Libraries
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
SET(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
|
||||
ELSE(APPLE)
|
||||
# Try to use pkg-config first...
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(COIN3D Coin)
|
||||
# ... then fall back to manual lookup
|
||||
IF(NOT COIN3D_FOUND)
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
${CMAKE_INCLUDE_PATH}
|
||||
/usr/include/Coin3
|
||||
/usr/include
|
||||
/usr/include/coin
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
PATH_SUFFIXES Coin2 Coin3
|
||||
)
|
||||
ENDIF(NOT COIN3D_FOUND)
|
||||
ENDIF(APPLE)
|
||||
|
||||
ENDIF (WIN32)
|
||||
|
||||
|
||||
IF(COIN3D_LIBRARIES)
|
||||
SET( COIN3D_FOUND "YES" )
|
||||
message(STATUS "Coin3D libraries found")
|
||||
|
||||
IF(NOT COIN3D_VERSION)
|
||||
file(READ "${COIN3D_INCLUDE_DIRS}/Inventor/C/basic.h" _coin3d_basic_h)
|
||||
string(REGEX MATCH "define[ \t]+COIN_MAJOR_VERSION[ \t]+([0-9?])" _coin3d_major_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+COIN_MINOR_VERSION[ \t]+([0-9?])" _coin3d_minor_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+COIN_MICRO_VERSION[ \t]+([0-9?])" _coin3d_micro_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MICRO_VERSION "${CMAKE_MATCH_1}")
|
||||
set(COIN3D_VERSION "${COIN3D_MAJOR_VERSION}.${COIN3D_MINOR_VERSION}.${COIN3D_MICRO_VERSION}")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT PIVY_VERSION)
|
||||
execute_process (COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')" OUTPUT_VARIABLE PIVY_VERSION)
|
||||
ENDIF()
|
||||
|
||||
ENDIF(COIN3D_LIBRARIES)
|
||||
|
||||
@@ -54,8 +54,28 @@ IF (COIN3D_FOUND)
|
||||
${CMAKE_BINARY_DIR}/src/Doc
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
SET( COIN3D_DOC_FOUND "YES" )
|
||||
SET( COIN3D_DOC_FOUND "YES"
|
||||
)
|
||||
#ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
# find_program(WGET_PROG wget
|
||||
# )
|
||||
# IF( EXISTS ${WGET_PROG})
|
||||
# execute_process(COMMAND ${WGET_PROG}
|
||||
# -P ${CMAKE_BINARY_DIR}/src/Doc
|
||||
# ${COIN3D_DOC_PATH}/coin.tag
|
||||
# )
|
||||
# find_file(COIN3D_DOC_TAGFILE coin.tag
|
||||
# ${CMAKE_BINARY_DIR}/src/Doc
|
||||
# )
|
||||
# IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
# SET( COIN3D_DOC_FOUND "YES"
|
||||
# )
|
||||
# ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
#
|
||||
# ENDIF( EXISTS ${WGET_PROG})
|
||||
|
||||
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
|
||||
ENDIF( EXISTS ${COIN3D_DOC_PATH})
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
@@ -16,9 +16,16 @@
|
||||
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
|
||||
|
||||
if(NOT Eigen3_FIND_VERSION)
|
||||
set(Eigen3_FIND_VERSION_MAJOR 3)
|
||||
set(Eigen3_FIND_VERSION_MINOR 0)
|
||||
set(Eigen3_FIND_VERSION_PATCH 0)
|
||||
if(NOT Eigen3_FIND_VERSION_MAJOR)
|
||||
set(Eigen3_FIND_VERSION_MAJOR 2)
|
||||
endif(NOT Eigen3_FIND_VERSION_MAJOR)
|
||||
if(NOT Eigen3_FIND_VERSION_MINOR)
|
||||
set(Eigen3_FIND_VERSION_MINOR 91)
|
||||
endif(NOT Eigen3_FIND_VERSION_MINOR)
|
||||
if(NOT Eigen3_FIND_VERSION_PATCH)
|
||||
set(Eigen3_FIND_VERSION_PATCH 0)
|
||||
endif(NOT Eigen3_FIND_VERSION_PATCH)
|
||||
|
||||
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
|
||||
endif(NOT Eigen3_FIND_VERSION)
|
||||
|
||||
@@ -35,17 +42,23 @@ macro(_eigen3_check_version)
|
||||
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
|
||||
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
|
||||
set(EIGEN3_VERSION_OK FALSE)
|
||||
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
|
||||
"but at least version ${Eigen3_FIND_VERSION} is required")
|
||||
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
|
||||
set(EIGEN3_VERSION_OK TRUE)
|
||||
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
|
||||
|
||||
if(NOT EIGEN3_VERSION_OK)
|
||||
|
||||
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
|
||||
"but at least version ${Eigen3_FIND_VERSION} is required")
|
||||
endif(NOT EIGEN3_VERSION_OK)
|
||||
endmacro(_eigen3_check_version)
|
||||
|
||||
if (EIGEN3_INCLUDE_DIR)
|
||||
|
||||
# in cache already
|
||||
_eigen3_check_version()
|
||||
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
|
||||
|
||||
else (EIGEN3_INCLUDE_DIR)
|
||||
|
||||
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
|
||||
@@ -58,8 +71,11 @@ else (EIGEN3_INCLUDE_DIR)
|
||||
if(EIGEN3_INCLUDE_DIR)
|
||||
_eigen3_check_version()
|
||||
endif(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Eigen3 REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK VERSION_VAR EIGEN3_VERSION)
|
||||
|
||||
mark_as_advanced(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
endif(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -127,6 +127,8 @@ if(OCC_FOUND)
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKIGES
|
||||
TKSTL
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
@@ -137,6 +139,10 @@ if(OCC_FOUND)
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKSTEPBase
|
||||
TKSTEPAttr
|
||||
TKSTEP209
|
||||
TKSTEP
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
@@ -148,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}")
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#
|
||||
# The following variables are optionally searched for defaults
|
||||
# OpenCV_ROOT_DIR: Base directory of OpenCv tree to use.
|
||||
# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
|
||||
# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
|
||||
# compatible interface. typically CV CXCORE CVAUX HIGHGUI CVCAM .. etc.
|
||||
#
|
||||
# The following are set after configuration is done:
|
||||
# The following are set after configuration is done:
|
||||
# OpenCV_FOUND
|
||||
# OpenCV_INCLUDE_DIR
|
||||
# OpenCV_LIBRARIES
|
||||
@@ -16,10 +16,10 @@
|
||||
# OPENCV_* uppercase replaced by case sensitive OpenCV_*
|
||||
# OPENCV_EXE_LINKER_FLAGS
|
||||
# OPENCV_INCLUDE_DIR : replaced by plural *_DIRS
|
||||
#
|
||||
# 2004/05 Jan Woetzel, Friso, Daniel Grest
|
||||
#
|
||||
# 2004/05 Jan Woetzel, Friso, Daniel Grest
|
||||
# 2006/01 complete rewrite by Jan Woetzel
|
||||
# 1006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES
|
||||
# 1006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES
|
||||
# to handle multiple installed versions gracefully by Jan Woetzel
|
||||
#
|
||||
# tested with:
|
||||
@@ -42,14 +42,14 @@ IF (NOT OpenCV_FIND_COMPONENTS)
|
||||
SET(OpenCV_FIND_REQUIRED_COMPONENTS CV CXCORE CVAUX HIGHGUI )
|
||||
IF (WIN32)
|
||||
LIST(APPEND OpenCV_FIND_REQUIRED_COMPONENTS CVCAM ) # WIN32 only actually
|
||||
ENDIF(WIN32)
|
||||
ENDIF(WIN32)
|
||||
ENDIF (NOT OpenCV_FIND_COMPONENTS)
|
||||
|
||||
|
||||
# typical root dirs of installations, exactly one of them is used
|
||||
SET (OpenCV_POSSIBLE_ROOT_DIRS
|
||||
"${OpenCV_ROOT_DIR}"
|
||||
"$ENV{OpenCV_ROOT_DIR}"
|
||||
"$ENV{OpenCV_ROOT_DIR}"
|
||||
"$ENV{OPENCV_DIR}" # only for backward compatibility deprecated by ROOT_DIR
|
||||
"$ENV{OPENCV_HOME}" # only for backward compatibility
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Intel(R) Open Source Computer Vision Library_is1;Inno Setup: App Path]"
|
||||
@@ -59,17 +59,17 @@ SET (OpenCV_POSSIBLE_ROOT_DIRS
|
||||
)
|
||||
|
||||
|
||||
# MIP Uni Kiel /opt/net network installation
|
||||
# MIP Uni Kiel /opt/net network installation
|
||||
# get correct prefix for current gcc compiler version for gcc 3.x 4.x
|
||||
IF (${CMAKE_COMPILER_IS_GNUCXX})
|
||||
IF (NOT OpenCV_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path")
|
||||
ENDIF (NOT OpenCV_FIND_QUIETLY)
|
||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE CXX_COMPILER_VERSION)
|
||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE CXX_COMPILER_VERSION)
|
||||
IF (CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
|
||||
SET(IS_GNUCXX3 TRUE)
|
||||
LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc33/OpenCV )
|
||||
ENDIF(CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
|
||||
ENDIF(CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
|
||||
IF (CXX_COMPILER_VERSION MATCHES ".*4\\.[0-9].*")
|
||||
SET(IS_GNUCXX4 TRUE)
|
||||
LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc41/OpenCV )
|
||||
@@ -79,15 +79,15 @@ ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
|
||||
#DBG_MSG("DBG (OpenCV_POSSIBLE_ROOT_DIRS=${OpenCV_POSSIBLE_ROOT_DIRS}")
|
||||
|
||||
#
|
||||
# select exactly ONE OpenCV base directory/tree
|
||||
# select exactly ONE OpenCV base directory/tree
|
||||
# to avoid mixing different version headers and libs
|
||||
#
|
||||
FIND_PATH(OpenCV_ROOT_DIR
|
||||
NAMES
|
||||
FIND_PATH(OpenCV_ROOT_DIR
|
||||
NAMES
|
||||
cv/include/cv.h # windows
|
||||
include/opencv/cv.h # linux /opt/net
|
||||
include/cv/cv.h
|
||||
include/cv.h
|
||||
include/cv/cv.h
|
||||
include/cv.h
|
||||
PATHS ${OpenCV_POSSIBLE_ROOT_DIRS})
|
||||
DBG_MSG("OpenCV_ROOT_DIR=${OpenCV_ROOT_DIR}")
|
||||
|
||||
@@ -106,7 +106,7 @@ SET(OpenCV_INCDIR_SUFFIXES
|
||||
otherlibs/_graphics/include
|
||||
)
|
||||
|
||||
# library linkdir suffixes appended to OpenCV_ROOT_DIR
|
||||
# library linkdir suffixes appended to OpenCV_ROOT_DIR
|
||||
SET(OpenCV_LIBDIR_SUFFIXES
|
||||
lib
|
||||
OpenCV/lib
|
||||
@@ -119,56 +119,56 @@ SET(OpenCV_LIBDIR_SUFFIXES
|
||||
# find incdir for each lib
|
||||
#
|
||||
FIND_PATH(OpenCV_CV_INCLUDE_DIR
|
||||
NAMES cv.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
NAMES cv.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
FIND_PATH(OpenCV_CXCORE_INCLUDE_DIR
|
||||
FIND_PATH(OpenCV_CXCORE_INCLUDE_DIR
|
||||
NAMES cxcore.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
FIND_PATH(OpenCV_CVAUX_INCLUDE_DIR
|
||||
FIND_PATH(OpenCV_CVAUX_INCLUDE_DIR
|
||||
NAMES cvaux.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR
|
||||
NAMES highgui.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR
|
||||
NAMES highgui.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
FIND_PATH(OpenCV_CVCAM_INCLUDE_DIR
|
||||
NAMES cvcam.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
FIND_PATH(OpenCV_CVCAM_INCLUDE_DIR
|
||||
NAMES cvcam.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
|
||||
#
|
||||
# find sbsolute path to all libraries
|
||||
# find sbsolute path to all libraries
|
||||
# some are optionally, some may not exist on Linux
|
||||
#
|
||||
FIND_LIBRARY(OpenCV_CV_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_CV_LIBRARY
|
||||
NAMES cv opencv
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CVAUX_LIBRARY
|
||||
NAMES cvaux
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CVCAM_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_CVCAM_LIBRARY
|
||||
NAMES cvcam
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CVHAARTRAINING_LIBRARY
|
||||
NAMES cvhaartraining
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CXCORE_LIBRARY
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CXCORE_LIBRARY
|
||||
NAMES cxcore
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CXTS_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_CXTS_LIBRARY
|
||||
NAMES cxts
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_HIGHGUI_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_HIGHGUI_LIBRARY
|
||||
NAMES highgui
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_ML_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_ML_LIBRARY
|
||||
NAMES ml
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_TRS_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_TRS_LIBRARY
|
||||
NAMES trs
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
|
||||
@@ -181,7 +181,7 @@ SET(OpenCV_FOUND ON)
|
||||
DBG_MSG("OpenCV_FIND_REQUIRED_COMPONENTS=${OpenCV_FIND_REQUIRED_COMPONENTS}")
|
||||
FOREACH(NAME ${OpenCV_FIND_REQUIRED_COMPONENTS} )
|
||||
|
||||
# only good if header and library both found
|
||||
# only good if header and library both found
|
||||
IF (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY)
|
||||
LIST(APPEND OpenCV_INCLUDE_DIRS ${OpenCV_${NAME}_INCLUDE_DIR} )
|
||||
LIST(APPEND OpenCV_LIBRARIES ${OpenCV_${NAME}_LIBRARY} )
|
||||
@@ -192,13 +192,13 @@ FOREACH(NAME ${OpenCV_FIND_REQUIRED_COMPONENTS} )
|
||||
"\nOpenCV_${NAME}_LIBRARY=${OpenCV_${NAME}_LIBRARY} ")
|
||||
SET(OpenCV_FOUND OFF)
|
||||
ENDIF (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY)
|
||||
|
||||
|
||||
ENDFOREACH(NAME)
|
||||
|
||||
DBG_MSG("OpenCV_INCLUDE_DIRS=${OpenCV_INCLUDE_DIRS}")
|
||||
DBG_MSG("OpenCV_LIBRARIES=${OpenCV_LIBRARIES}")
|
||||
|
||||
# get the link directory for rpath to be used with LINK_DIRECTORIES:
|
||||
# get the link directory for rpath to be used with LINK_DIRECTORIES:
|
||||
IF (OpenCV_CV_LIBRARY)
|
||||
GET_FILENAME_COMPONENT(OpenCV_LINK_DIRECTORIES ${OpenCV_CV_LIBRARY} PATH)
|
||||
ENDIF (OpenCV_CV_LIBRARY)
|
||||
@@ -239,7 +239,7 @@ IF(NOT OpenCV_FOUND)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"OpenCV required but some headers or libs not found. Please specify it's location with OpenCV_ROOT_DIR env. variable.")
|
||||
ELSE(OpenCV_FIND_REQUIRED)
|
||||
MESSAGE(STATUS
|
||||
MESSAGE(STATUS
|
||||
"ERROR: OpenCV was not found.")
|
||||
ENDIF(OpenCV_FIND_REQUIRED)
|
||||
ENDIF(NOT OpenCV_FIND_QUIETLY)
|
||||
|
||||
@@ -53,7 +53,7 @@ else(PYCXX_INCLUDE_DIR)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT PYCXX_INCLUDE_DIR)
|
||||
endif(PYCXX_INCLUDE_DIR)
|
||||
|
||||
|
||||
# find the sources directory
|
||||
if(PYCXX_SOURCE_DIR)
|
||||
# source directory specified, they'd better be there
|
||||
@@ -117,11 +117,11 @@ if(PYCXX_FOUND)
|
||||
${PYCXX_SOURCE_DIR}/cxxsupport.cxx
|
||||
${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
|
||||
)
|
||||
|
||||
#set old 6.2 pycxx compatibility
|
||||
list(APPEND PYCXX_SOURCES ${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx)
|
||||
add_definitions(-DPYCXX_6_2_COMPATIBILITY)
|
||||
#end old compatibility
|
||||
if(NOT ${PYCXX_VERSION} VERSION_LESS 7.0.0)
|
||||
list(APPEND PYCXX_SOURCES
|
||||
${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx)
|
||||
add_definitions(-DPYCXX_6_2_COMPATIBILITY)
|
||||
endif()
|
||||
else(PYCXX_FOUND)
|
||||
MESSAGE(STATUS "PyCXX not found")
|
||||
endif(PYCXX_FOUND)
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
# Try to find PySide2 utilities, PYSIDE2UIC and PYSIDE2RCC:
|
||||
# PYSIDE_UIC_EXECUTABLE - Location of PYSIDE2UIC executable
|
||||
# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE2RCC executable
|
||||
# PYSIDE_TOOLS_FOUND - PySide2 utilities found.
|
||||
# PYSIDE2UICBINARY - Location of PYSIDE2UIC executable
|
||||
# PYSIDE2RCCBINARY - Location of PYSIDE2RCC executable
|
||||
# PYSIDE2_TOOLS_FOUND - PySide2 utilities found.
|
||||
|
||||
# Also provides macro similar to FindQt4.cmake's WRAP_UI and WRAP_RC,
|
||||
# for the automatic generation of Python code from Qt4's user interface
|
||||
# ('.ui') and resource ('.qrc') files. These macros are called:
|
||||
# - PYSIDE_WRAP_UI
|
||||
# - PYSIDE_WRAP_RC
|
||||
|
||||
IF(PYSIDE2UICBINARY AND PYSIDE2RCCBINARY)
|
||||
# Already in cache, be silent
|
||||
set(PYSIDE2_TOOLS_FOUND_QUIETLY TRUE)
|
||||
ENDIF(PYSIDE2UICBINARY AND PYSIDE2RCCBINARY)
|
||||
|
||||
if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
#pyside2 tools are often in same location as python interpreter
|
||||
@@ -16,32 +27,88 @@ FIND_PACKAGE(Qt5 COMPONENTS Core Widgets)
|
||||
|
||||
IF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
# Legacy (< 5.14)
|
||||
FIND_PROGRAM(PYSIDE2_UIC_EXECUTABLE NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2_RCC_EXECUTABLE NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
|
||||
set(UICOPTIONS "")
|
||||
set(RCCOPTIONS "")
|
||||
ELSE()
|
||||
# New (>= 5.14)
|
||||
if (TARGET Qt::uic)
|
||||
get_property(PYSIDE2_UIC_EXECUTABLE TARGET Qt::uic PROPERTY LOCATION)
|
||||
get_property(PYSIDE2UICBINARY TARGET Qt::uic PROPERTY LOCATION)
|
||||
set(UICOPTIONS "--generator=python")
|
||||
endif()
|
||||
if (TARGET Qt::rcc)
|
||||
get_property(PYSIDE2_RCC_EXECUTABLE TARGET Qt::rcc PROPERTY LOCATION)
|
||||
get_property(PYSIDE2RCCBINARY TARGET Qt::rcc PROPERTY LOCATION)
|
||||
set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
|
||||
endif()
|
||||
ENDIF()
|
||||
ENDIF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
|
||||
set(PYSIDE_RCC_EXECUTABLE ${PYSIDE2_RCC_EXECUTABLE})
|
||||
set(PYSIDE_UIC_EXECUTABLE ${PYSIDE2_UIC_EXECUTABLE})
|
||||
set(PySideTools_VERSION 2)
|
||||
MACRO(PYSIDE_WRAP_UI outfiles)
|
||||
if (NOT PYSIDE2UICBINARY)
|
||||
message(FATAL_ERROR "Qt uic is required for generating ${ARGN}")
|
||||
endif()
|
||||
FOREACH(it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
|
||||
#ADD_CUSTOM_TARGET(${it} ALL
|
||||
# DEPENDS ${outfile}
|
||||
#)
|
||||
if(WIN32 OR APPLE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
else()
|
||||
# Especially on Open Build Service we don't want changing date like
|
||||
# pyside2-uic generates in comments at beginning., which is why
|
||||
# we follow the tool command with a POSIX-friendly sed.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
|
||||
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endif()
|
||||
list(APPEND ${outfiles} ${outfile})
|
||||
ENDFOREACH(it)
|
||||
ENDMACRO (PYSIDE_WRAP_UI)
|
||||
|
||||
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
|
||||
set(PYSIDE_TOOLS_FOUND TRUE)
|
||||
MACRO(PYSIDE_WRAP_RC outfiles)
|
||||
if (NOT PYSIDE2RCCBINARY)
|
||||
message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}")
|
||||
endif()
|
||||
FOREACH(it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}_rc.py")
|
||||
#ADD_CUSTOM_TARGET(${it} ALL
|
||||
# DEPENDS ${outfile}
|
||||
#)
|
||||
if(WIN32 OR APPLE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
else()
|
||||
# Especially on Open Build Service we don't want changing date like
|
||||
# pyside-rcc generates in comments at beginning, which is why
|
||||
# we follow the tool command with in-place sed.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
|
||||
COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
|
||||
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endif()
|
||||
list(APPEND ${outfiles} ${outfile})
|
||||
ENDFOREACH(it)
|
||||
ENDMACRO (PYSIDE_WRAP_RC)
|
||||
|
||||
if(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
|
||||
set(PYSIDE2_TOOLS_FOUND TRUE)
|
||||
if (NOT PySide2Tools_FIND_QUIETLY)
|
||||
message(STATUS "Found PySide2 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}")
|
||||
message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}")
|
||||
endif (NOT PySide2Tools_FIND_QUIETLY)
|
||||
else()
|
||||
else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
|
||||
if(PySide2Tools_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "PySide2 tools could not be found, but are required.")
|
||||
else(PySide2Tools_FIND_REQUIRED)
|
||||
@@ -49,4 +116,4 @@ else()
|
||||
message(STATUS "PySide2 tools: not found.")
|
||||
endif (NOT PySide2Tools_FIND_QUIETLY)
|
||||
endif(PySide2Tools_FIND_REQUIRED)
|
||||
endif()
|
||||
endif(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
|
||||
|
||||
@@ -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()
|
||||
@@ -1,32 +0,0 @@
|
||||
# Try to find PYSIDE6 utilities, PYSIDE6UIC and PYSIDE6RCC:
|
||||
# PYSIDE_UIC_EXECUTABLE - Location of PYSIDE6UIC executable
|
||||
# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE6RCC executable
|
||||
# PYSIDE_TOOLS_FOUND - PYSIDE6 utilities found.
|
||||
|
||||
if (TARGET Qt6::uic)
|
||||
get_target_property(PYSIDE6_UIC_EXECUTABLE Qt6::uic LOCATION)
|
||||
set(UICOPTIONS "--generator=python")
|
||||
endif()
|
||||
if (TARGET Qt6::rcc)
|
||||
get_target_property(PYSIDE6_RCC_EXECUTABLE Qt6::rcc LOCATION)
|
||||
set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
|
||||
endif()
|
||||
|
||||
set(PYSIDE_RCC_EXECUTABLE ${PYSIDE6_RCC_EXECUTABLE})
|
||||
set(PYSIDE_UIC_EXECUTABLE ${PYSIDE6_UIC_EXECUTABLE})
|
||||
set(PySideTools_VERSION 6)
|
||||
|
||||
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
|
||||
set(PYSIDE_TOOLS_FOUND TRUE)
|
||||
if (NOT PYSIDE6Tools_FIND_QUIETLY)
|
||||
message(STATUS "Found PYSIDE6 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}")
|
||||
endif ()
|
||||
else()
|
||||
if(PYSIDE6Tools_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "PYSIDE6 tools could not be found, but are required.")
|
||||
else()
|
||||
if (NOT PYSIDE6Tools_FIND_QUIETLY)
|
||||
message(STATUS "PYSIDE6 tools: not found.")
|
||||
endif ()
|
||||
endif()
|
||||
endif()
|
||||
@@ -6,7 +6,7 @@
|
||||
# OCULUS_LIBRARIES
|
||||
#
|
||||
# Copyright (c) 2012 I-maginer
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU Lesser General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
@@ -42,11 +42,11 @@ IF(OCULUS_ROOT)
|
||||
${OCULUS_INCLUDE_SEARCH_DIRS}
|
||||
${OCULUS_ROOT}/include
|
||||
)
|
||||
SET(OCULUS_LIBRARY_SEARCH_RELEASE_DIRS
|
||||
SET(OCULUS_LIBRARY_SEARCH_RELEASE_DIRS
|
||||
${OCULUS_LIBRARY_SEARCH_DIRS}
|
||||
${OCULUS_ROOT}/Lib/x64/VS2012
|
||||
)
|
||||
SET(OCULUS_LIBRARY_SEARCH_DEBUG_DIRS
|
||||
SET(OCULUS_LIBRARY_SEARCH_DEBUG_DIRS
|
||||
${OCULUS_LIBRARY_SEARCH_DIRS}
|
||||
${OCULUS_ROOT}/Lib/x64/VS2012
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ find_package(VTK REQUIRED)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
add_definitions(-DSALOME_USE_64BIT_IDS)
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
|
||||
IF (CMAKE_COMPILER_IS_GNUCC)
|
||||
FIND_PATH(SMESH_INCLUDE_DIR SMESH_Mesh.hxx
|
||||
# These are default search paths, why specify them?
|
||||
@@ -27,7 +27,7 @@ ENDIF (CMAKE_COMPILER_IS_GNUCC)
|
||||
IF(SMESH_INCLUDE_DIR)
|
||||
SET(SMESH_INC_ROOT "${SMESH_INCLUDE_DIR}/..")
|
||||
# Append extra include dirs
|
||||
SET(SMESH_INCLUDE_DIR
|
||||
SET(SMESH_INCLUDE_DIR
|
||||
"${SMESH_INCLUDE_DIR};
|
||||
${SMESH_INC_ROOT}/Controls;
|
||||
${SMESH_INC_ROOT}/Driver;
|
||||
@@ -53,7 +53,7 @@ SET(SMESH_FOUND FALSE)
|
||||
IF(SMESH_LIBRARY)
|
||||
SET(SMESH_FOUND TRUE)
|
||||
GET_FILENAME_COMPONENT(SMESH_LIBRARY_DIR ${SMESH_LIBRARY} PATH)
|
||||
set(SMESH_LIBRARIES
|
||||
set(SMESH_LIBRARIES
|
||||
${SMESH_LIBRARY_DIR}/libDriver.so
|
||||
${SMESH_LIBRARY_DIR}/libDriverDAT.so
|
||||
${SMESH_LIBRARY_DIR}/libDriverSTL.so
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# The Qt for Python project officially recommends using pip to install Shiboken, so we expect to find Shiboken in the
|
||||
# site-packages directory. FreeCAD also requires shiboken6_generator, so this find script also locates that package
|
||||
# and ensures the inclusion of its include directory when using the pip finding mechanism
|
||||
|
||||
|
||||
find_package(Shiboken6 CONFIG QUIET)
|
||||
if(NOT Shiboken6_FOUND)
|
||||
if(NOT Shiboken6_INCLUDE_DIR AND TARGET Shiboken6::Shiboken6)
|
||||
get_property(Shiboken6_INCLUDE_DIR TARGET Shiboken6::Shiboken6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
if(NOT Shiboken6_INCLUDE_DIR)
|
||||
find_pip_package(Shiboken6)
|
||||
if (Shiboken6_FOUND)
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "")
|
||||
set(SHIBOKEN_MAJOR_VERSION 6 CACHE INTERNAL 6)
|
||||
set(SHIBOKEN_FOUND ON CACHE BOOL OFF)
|
||||
endif()
|
||||
# The include directory we actually want is part of shiboken6-generator
|
||||
find_pip_package(shiboken6_generator)
|
||||
if (shiboken6_generator_FOUND)
|
||||
set(SHIBOKEN_INCLUDE_DIR ${shiboken6_generator_INCLUDE_DIRS} CACHE PATH "")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(SHIBOKEN_INCLUDE_DIR ${Shiboken6_INCLUDE_DIRS} CACHE PATH "")
|
||||
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "")
|
||||
set(SHIBOKEN_FOUND ON CACHE BOOL OFF)
|
||||
endif()
|
||||
@@ -17,7 +17,7 @@ macro(CheckInterModuleDependencies)
|
||||
endif(${dependent})
|
||||
endfunction(REQUIRES_MODS)
|
||||
|
||||
REQUIRES_MODS(BUILD_BIM BUILD_PART BUILD_MESH BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_ARCH BUILD_PART BUILD_MESH BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER)
|
||||
REQUIRES_MODS(BUILD_DRAWING BUILD_PART BUILD_SPREADSHEET)
|
||||
REQUIRES_MODS(BUILD_FEM BUILD_PART)
|
||||
@@ -28,14 +28,14 @@ macro(CheckInterModuleDependencies)
|
||||
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH BUILD_SMESH)
|
||||
REQUIRES_MODS(BUILD_FLAT_MESH BUILD_MESH_PART)
|
||||
REQUIRES_MODS(BUILD_OPENSCAD BUILD_MESH_PART BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_PART BUILD_MATERIAL)
|
||||
REQUIRES_MODS(BUILD_PART_DESIGN BUILD_SKETCHER)
|
||||
# REQUIRES_MODS(BUILD_CAM BUILD_PART BUILD_MESH BUILD_ROBOT)
|
||||
REQUIRES_MODS(BUILD_CAM BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_REVERSEENGINEERING BUILD_PART BUILD_MESH BUILD_POINTS)
|
||||
REQUIRES_MODS(BUILD_PATH BUILD_PART BUILD_MESH BUILD_ROBOT)
|
||||
REQUIRES_MODS(BUILD_RAYTRACING BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_REVERSEENGINEERING BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_ROBOT BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_SANDBOX BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_SKETCHER BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_SPREADSHEET BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_START BUILD_WEB)
|
||||
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET)
|
||||
endmacro(CheckInterModuleDependencies)
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
# ADAPTED FOR FREECAD FROM VTK'S vtkQt.cmake
|
||||
# ORIGINAL VTK COPYRIGHT NOTICE FOLLOWS (BSD 3-CLAUSE)
|
||||
#
|
||||
# /*=========================================================================
|
||||
#
|
||||
# Program: Visualization Toolkit
|
||||
# Module: Copyright.txt
|
||||
#
|
||||
# Copyright (c) 1993-2015 Ken Martin, Will Schroeder, Bill Lorensen
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
|
||||
# of any contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# =========================================================================*/
|
||||
|
||||
|
||||
# FREECAD_QT_VERSION is used to choose between Qt5 and Qt6.
|
||||
|
||||
# If it is set to Auto(default), FreeCAD finds and uses the
|
||||
# version installed on the system. If both versions are
|
||||
# found, Qt5 is preferred.
|
||||
|
||||
# The output variable is FREECAD_QT_MAJOR_VERSION, which will be either 5 or 6
|
||||
|
||||
macro(ChooseQtVersion)
|
||||
set(freecad_supported_qt_versions "Auto" 5 6)
|
||||
|
||||
# The following `if` check can be removed once CMake 3.21 is required and
|
||||
# the policy CMP0126 is set to NEW.
|
||||
if (NOT DEFINED FREECAD_QT_VERSION)
|
||||
set(FREECAD_QT_VERSION "Auto" CACHE
|
||||
STRING "Expected Qt major version. Valid values are Auto, 5, 6.")
|
||||
set_property(CACHE FREECAD_QT_VERSION PROPERTY STRINGS "${freecad_supported_qt_versions}")
|
||||
endif()
|
||||
|
||||
if(FREECAD_LIBPACK_USE)
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE_VERSION NAMES FREECAD_LIBPACK_VERSION PATHS ${FREECAD_LIBPACK_DIR} NO_DEFAULT_PATH)
|
||||
if(FREECAD_LIBPACK_CHECKFILE_VERSION)
|
||||
file(READ ${FREECAD_LIBPACK_CHECKFILE_VERSION} FREECAD_LIBPACK_VERSION)
|
||||
message(STATUS "LibPack: read version file and got ${FREECAD_LIBPACK_VERSION}")
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
message(STATUS "Using Qt6 directory from LibPack in ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt6")
|
||||
set(Qt6_DIR ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt6)
|
||||
set(FREECAD_QT_VERSION 6)
|
||||
else()
|
||||
message(ERROR ": Unrecognized LibPack version ${FREECAD_LIBPACK_CHECKFILE_VERSION}")
|
||||
endif()
|
||||
else()
|
||||
if (NOT Qt5_DIR OR Qt5_DIR STREQUAL "Qt5_DIR-NOTFOUND")
|
||||
message(STATUS "Using Qt5 directory from LibPack in ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt5")
|
||||
set(Qt5_DIR ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt5)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT FREECAD_QT_VERSION STREQUAL "Auto")
|
||||
if (NOT FREECAD_QT_VERSION IN_LIST freecad_supported_qt_versions)
|
||||
message(FATAL_ERROR
|
||||
"Supported Qt versions are \"${freecad_supported_qt_versions}\". But "
|
||||
"FREECAD_QT_VERSION is set to ${FREECAD_QT_VERSION}.")
|
||||
endif ()
|
||||
set(_FREECAD_QT_VERSION "${FREECAD_QT_VERSION}")
|
||||
else ()
|
||||
find_package(Qt5 QUIET COMPONENTS Core)
|
||||
set(_FREECAD_QT_VERSION 5)
|
||||
if (NOT Qt5_FOUND)
|
||||
find_package(Qt6 QUIET COMPONENTS Core)
|
||||
if (NOT Qt6_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"Could not find a valid Qt installation. Consider setting Qt5_DIR or Qt6_DIR (as needed).")
|
||||
endif ()
|
||||
set(_FREECAD_QT_VERSION 6)
|
||||
endif ()
|
||||
endif ()
|
||||
set(FREECAD_QT_MAJOR_VERSION "${_FREECAD_QT_VERSION}" CACHE INTERNAL
|
||||
"Major version number for the Qt installation used.")
|
||||
message(STATUS "Compiling with Qt ${FREECAD_QT_MAJOR_VERSION}")
|
||||
endmacro()
|
||||
@@ -17,9 +17,9 @@ macro(CompilerChecksAndSetups)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
endif()
|
||||
|
||||
# Allow developers to use Boost < 1.65
|
||||
# Allow developers to use Boost < 1.55
|
||||
if (NOT BOOST_MIN_VERSION)
|
||||
set(BOOST_MIN_VERSION 1.65)
|
||||
set(BOOST_MIN_VERSION 1.55)
|
||||
endif()
|
||||
|
||||
# For older cmake versions the variable 'CMAKE_CXX_COMPILER_VERSION' is missing
|
||||
@@ -42,12 +42,14 @@ macro(CompilerChecksAndSetups)
|
||||
endif()
|
||||
|
||||
# Escape the two plus chars as otherwise cmake complains about invalid regex
|
||||
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+23")
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
|
||||
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
else()#Enabled C++17
|
||||
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+17")
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+14")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
elseif (${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+11")
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
# Log the compiler and version
|
||||
@@ -55,7 +57,7 @@ macro(CompilerChecksAndSetups)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
include(${CMAKE_SOURCE_DIR}/cMake/ConfigureChecks.cmake)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
# For now only set pedantic option for clang
|
||||
@@ -75,11 +77,7 @@ macro(CompilerChecksAndSetups)
|
||||
endif()
|
||||
else(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
if(APPLE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
|
||||
elseif(UNIX)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--undefined,dynamic_lookup")
|
||||
endif()
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
|
||||
endif()
|
||||
endif(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
@@ -95,14 +93,13 @@ macro(CompilerChecksAndSetups)
|
||||
endif()
|
||||
add_definitions(-DGL_SILENCE_DEPRECATION)
|
||||
elseif (UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# older boost.preprocessor turn off variadics for clang
|
||||
add_definitions(-DBOOST_PP_VARIADICS=1)
|
||||
message(STATUS "Force BOOST_PP_VARIADICS=1 for clang")
|
||||
endif()
|
||||
|
||||
set (COMPILE_DEFINITIONS ${COMPILE_DEFINITIONS} BOOST_NO_CXX98_FUNCTION_BASE)
|
||||
|
||||
endmacro(CompilerChecksAndSetups)
|
||||
|
||||
@@ -2,7 +2,7 @@ macro(ConfigureCMakeVariables)
|
||||
# ================================================================================
|
||||
# Output directories for install target
|
||||
|
||||
if(MSVC)
|
||||
if(WIN32)
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "Installation root directory")
|
||||
set(CMAKE_INSTALL_BINDIR bin CACHE PATH "Output directory for executables")
|
||||
set(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
macro(CopyLibpackDirectories)
|
||||
# Copy libpack dependency directories to build folder for user as part of overall build process
|
||||
if(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
|
||||
message(STATUS "Copying libpack dependency directories to build directory...")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/assistant.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/qt.conf DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
if(NOT FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/tls DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
message(STATUS "... end copying.\n=======================================\n")
|
||||
endif()
|
||||
|
||||
if(COPY_LIBPACK_BIN_TO_BUILD)
|
||||
if(FREECAD_COPY_LIBPACK_BIN_TO_BUILD)
|
||||
message("Copying LibPack 'bin' directory to build 'bin' directory...")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_BINARY_DIR})
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
message("Copying DLLs from LibPack 'lib' directory to build 'bin' directory...")
|
||||
file(GLOB DLLS ${FREECAD_LIBPACK_DIR}/lib/*.dll)
|
||||
file(COPY ${DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(GLOB DLLS ${FREECAD_LIBPACK_DIR}/bin/Lib/site-packages/shiboken6/shiboken*.dll)
|
||||
file(COPY ${DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(GLOB DLLS ${FREECAD_LIBPACK_DIR}/bin/Lib/site-packages/PySide6/pyside6*.dll)
|
||||
file(COPY ${DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
message(STATUS " ... done.")
|
||||
endif()
|
||||
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying plugins to build directory.")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_INSTALL_DEPEND_DIRS)
|
||||
# Test install command for installing/copying directories
|
||||
message(STATUS "=======================================")
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
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()
|
||||
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,46 +4,38 @@ macro(FreeCADLibpackChecks)
|
||||
if(FREECAD_LIBPACK_USE)
|
||||
|
||||
# checking for a unique file in LibPack location to make sure the right version of the LibPack is there
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db PATHS ${FREECAD_LIBPACK_DIR} NO_DEFAULT_PATH NO_CACHE)
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE_VERSION FREECAD_LIBPACK_VERSION PATHS ${FREECAD_LIBPACK_DIR} NO_DEFAULT_PATH NO_CACHE)
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db ${FREECAD_LIBPACK_DIR})
|
||||
|
||||
# don't show them in the GUI
|
||||
set(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER "${FREECAD_LIBPACK_CHECKFILE_CLBUNDLER}" CACHE INTERNAL "Find libpack")
|
||||
set(FREECAD_LIBPACK_CHECKFILE_VERSION "${FREECAD_LIBPACK_CHECKFILE_VERSION}" CACHE INTERNAL "Find libpack v3+")
|
||||
|
||||
if (FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
set(FREECAD_LIBPACK_VERSION "CLbundler" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
message("Found LibPack v2 (CLBundler) via ${FREECAD_LIBPACK_CHECKFILE_CLBUNDLER}")
|
||||
include(cMake/UseLibPackCLbundler.cmake)
|
||||
elseif (FREECAD_LIBPACK_CHECKFILE_VERSION)
|
||||
file(READ ${FREECAD_LIBPACK_CHECKFILE_VERSION} FREECAD_LIBPACK_VERSION)
|
||||
set(FREECAD_LIBPACK_VERSION "${FREECAD_LIBPACK_VERSION}" CACHE STRING "Version of the LibPack, if found" FORCE)
|
||||
message("Found LibPack " ${FREECAD_LIBPACK_VERSION})
|
||||
include(cMake/UseLibPack3.cmake)
|
||||
else(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
set(FREECAD_LIBPACK_VERSION "NOTFOUND" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
message(SEND_ERROR "Could not find LibPack in specified location:" ${FREECAD_LIBPACK_DIR})
|
||||
message(SEND_ERROR "Could not find libpack in specified location:" ${FREECAD_LIBPACK_DIR})
|
||||
endif(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
# -------------------------------- PyCXX --------------------------------
|
||||
|
||||
find_package(PyCXX REQUIRED)
|
||||
find_package(PyCXX REQUIRED)
|
||||
|
||||
# -------------------------------- Swig ----------------------------------
|
||||
|
||||
find_package(SWIG)
|
||||
find_package(SWIG)
|
||||
|
||||
if(NOT SWIG_FOUND)
|
||||
message("==================================================\n"
|
||||
"SWIG not found, don't build SWIG binding for pivy.\n"
|
||||
"==================================================\n")
|
||||
endif(NOT SWIG_FOUND)
|
||||
if(NOT SWIG_FOUND)
|
||||
message("==================================================\n"
|
||||
"SWIG not found, don't build SWIG binding for pivy.\n"
|
||||
"==================================================\n")
|
||||
endif(NOT SWIG_FOUND)
|
||||
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
|
||||
if(NOT FREECAD_USE_EXTERNAL_SMESH)
|
||||
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
||||
endif()
|
||||
if(NOT FREECAD_USE_EXTERNAL_SMESH)
|
||||
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
||||
endif()
|
||||
|
||||
endif(FREECAD_LIBPACK_USE)
|
||||
endif(FREECAD_LIBPACK_USE)
|
||||
|
||||
endmacro(FreeCADLibpackChecks)
|
||||
|
||||
@@ -8,13 +8,12 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_FMT "Use system installed fmt library if available instead of fetching the source." ON)
|
||||
option(FREECAD_USE_EXTERNAL_ONDSELSOLVER "Use system installed OndselSolver instead of git submodule." OFF)
|
||||
option(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
|
||||
option(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
option(FREECAD_TOPONAMING_BRANDING "Enable branding for TopoNaming branch" ON)
|
||||
option(BUILD_WITH_CONDA "Set ON if you build FreeCAD with conda" OFF)
|
||||
option(BUILD_DYNAMIC_LINK_PYTHON "If OFF extension-modules do not link against python-libraries" ON)
|
||||
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" ON)
|
||||
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" OFF)
|
||||
option(OCCT_CMAKE_FALLBACK "disable usage of occt-config files" OFF)
|
||||
if (WIN32 OR APPLE)
|
||||
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF)
|
||||
@@ -27,6 +26,7 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(FREECAD_RELEASE_PDB "Create PDB files for Release version." ON)
|
||||
option(FREECAD_RELEASE_SEH "Enable Structured Exception Handling for Release version." ON)
|
||||
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." ON)
|
||||
option(FREECAD_LIBPACK_USEPYSIDE "Use PySide in LibPack rather to PyQt and Swig." ON)
|
||||
option(FREECAD_USE_PCH "Activate precompiled headers where it's used." ON)
|
||||
|
||||
if (DEFINED ENV{FREECAD_LIBPACK_DIR})
|
||||
@@ -55,18 +55,14 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(FREECAD_COPY_PLUGINS_BIN_TO_BUILD "Copy plugins to the build directory." OFF)
|
||||
endif()
|
||||
else()
|
||||
message(WARNING Could not locate ${FREECAD_LIBPACK_DIR}/plugins/imageformats/qsvg.dll)
|
||||
message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
|
||||
message(STATUS "Visit: https://github.com/FreeCAD/FreeCAD-Libpack/releases/ for Windows libpack downloads.")
|
||||
message(STATUS "Visit: https://github.com/apeltauer/FreeCAD/releases/ for Windows libpack downloads.")
|
||||
endif()
|
||||
elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
option(FREECAD_WARN_ERROR "Make all warnings into errors. " OFF)
|
||||
else(MSVC)
|
||||
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
|
||||
set(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
endif(MSVC)
|
||||
|
||||
ChooseQtVersion()
|
||||
option(BUILD_QT5 "Build with Qt5." ON)
|
||||
|
||||
# https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
|
||||
set(FREECAD_USE_OCC_VARIANT "Community Edition" CACHE STRING "Official OpenCASCADE version or community edition")
|
||||
@@ -75,6 +71,14 @@ macro(InitializeFreeCADBuildOptions)
|
||||
"Community Edition"
|
||||
)
|
||||
|
||||
if (BUILD_QT5)
|
||||
set(FREECAD_USE_QTWEBMODULE "Automatic" CACHE STRING "Qt Webkit or Qt WebEngine")
|
||||
set_property(CACHE FREECAD_USE_QTWEBMODULE PROPERTY STRINGS
|
||||
"Automatic"
|
||||
"Qt Webkit"
|
||||
"Qt WebEngine"
|
||||
)
|
||||
endif()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtOpenGL.h.cmake ${CMAKE_BINARY_DIR}/src/QtOpenGL.h)
|
||||
|
||||
option(BUILD_DESIGNER_PLUGIN "Build and install the designer plugin" OFF)
|
||||
@@ -107,25 +111,26 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF)
|
||||
option(BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF)
|
||||
option(BUILD_ADDONMGR "Build the FreeCAD addon manager module" ON)
|
||||
option(BUILD_BIM "Build the FreeCAD BIM module" ON)
|
||||
option(BUILD_ARCH "Build the FreeCAD Architecture module" ON)
|
||||
option(BUILD_COMPLETE "Build the FreeCAD complete module" OFF)
|
||||
option(BUILD_DRAFT "Build the FreeCAD draft module" ON)
|
||||
option(BUILD_DRAWING "Build the FreeCAD drawing module" OFF)
|
||||
option(BUILD_HELP "Build the FreeCAD help module" ON)
|
||||
option(BUILD_IDF "Build the FreeCAD idf module" ON)
|
||||
option(BUILD_IMAGE "Build the FreeCAD image module" ON)
|
||||
option(BUILD_IMPORT "Build the FreeCAD import module" ON)
|
||||
option(BUILD_INSPECTION "Build the FreeCAD inspection module" ON)
|
||||
option(BUILD_JTREADER "Build the FreeCAD jt reader module" OFF)
|
||||
option(BUILD_MATERIAL "Build the FreeCAD material module" ON)
|
||||
option(BUILD_MESH "Build the FreeCAD mesh module" ON)
|
||||
option(BUILD_MESH_PART "Build the FreeCAD mesh part module" ON)
|
||||
option(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" ON)
|
||||
option(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" OFF)
|
||||
option(BUILD_OPENSCAD "Build the FreeCAD openscad module" ON)
|
||||
option(BUILD_PART "Build the FreeCAD part module" ON)
|
||||
option(BUILD_PART_DESIGN "Build the FreeCAD part design module" ON)
|
||||
option(BUILD_CAM "Build the FreeCAD CAM module" ON)
|
||||
option(BUILD_ASSEMBLY "Build the FreeCAD Assembly module" ON)
|
||||
option(BUILD_PATH "Build the FreeCAD path module" ON)
|
||||
option(BUILD_PLOT "Build the FreeCAD plot module" ON)
|
||||
option(BUILD_POINTS "Build the FreeCAD points module" ON)
|
||||
option(BUILD_RAYTRACING "Build the FreeCAD ray tracing module" ON)
|
||||
option(BUILD_REVERSEENGINEERING "Build the FreeCAD reverse engineering module" ON)
|
||||
option(BUILD_ROBOT "Build the FreeCAD robot module" ON)
|
||||
option(BUILD_SHOW "Build the FreeCAD Show module (helper module for visibility automation)" ON)
|
||||
@@ -133,21 +138,12 @@ 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)
|
||||
set(FREECAD_3DCONNEXION_SUPPORT "NavLib" CACHE STRING "Select version of the 3Dconnexion device integration")
|
||||
set_property(CACHE FREECAD_3DCONNEXION_SUPPORT PROPERTY STRINGS "NavLib" "Raw input")
|
||||
else(MSVC)
|
||||
set(FREECAD_3DCONNEXION_SUPPORT "Raw input")
|
||||
endif(MSVC)
|
||||
|
||||
if(MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
|
||||
@@ -168,11 +164,6 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF)
|
||||
endif(NOT MSVC)
|
||||
|
||||
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "NavLib" AND FREECAD_USE_3DCONNEXION)
|
||||
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
|
||||
set(FREECAD_USE_3DCONNEXION OFF)
|
||||
endif()
|
||||
|
||||
# if this is set override some options
|
||||
if (FREECAD_BUILD_DEBIAN)
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON )
|
||||
@@ -184,10 +175,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
|
||||
|
||||
@@ -1,220 +1,267 @@
|
||||
macro(PrintFinalReport)
|
||||
# -------------------------------- The final report ----------------------------------
|
||||
|
||||
# name and value
|
||||
macro(simple)
|
||||
set(name ${ARGV0})
|
||||
set(value ${ARGV1})
|
||||
if(NOT value)
|
||||
set(value "-undefined-")
|
||||
endif()
|
||||
string(APPEND name ": ")
|
||||
string(SUBSTRING ${name} 0 28 nameStr)
|
||||
list(APPEND simpleLines "${nameStr} ${value}")
|
||||
endmacro()
|
||||
message(STATUS "\n==============\n"
|
||||
"Summary report\n"
|
||||
"==============\n")
|
||||
if (DEFINED CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
# just a value
|
||||
macro(value)
|
||||
unset(val)
|
||||
set(name ${ARGV0})
|
||||
if(${name})
|
||||
set(val ${${name}}) # name has a value
|
||||
elseif(DEFINED ${name})
|
||||
set(val "OFF ") #!
|
||||
endif()
|
||||
simple(${name} ${val})
|
||||
endmacro()
|
||||
|
||||
# conditional data
|
||||
macro(conditional)
|
||||
set(name ${ARGV0})
|
||||
set(condition ${ARGV1})
|
||||
set(ifFalse ${ARGV2})
|
||||
set(ifTrue ${ARGV3})
|
||||
if(${condition})
|
||||
set(out ${ifTrue})
|
||||
else()
|
||||
set(out ${ifFalse})
|
||||
endif()
|
||||
simple(${name} ${out})
|
||||
endmacro()
|
||||
|
||||
function(section_begin name)
|
||||
unset(simpleLines PARENT_SCOPE)
|
||||
message("\n ==============\n"
|
||||
" ${name}\n"
|
||||
" ==============\n")
|
||||
endfunction()
|
||||
|
||||
function(section_end)
|
||||
list(SORT simpleLines CASE INSENSITIVE)
|
||||
foreach(line ${simpleLines})
|
||||
message(STATUS ${line})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
############## System ####################
|
||||
|
||||
section_begin(System)
|
||||
|
||||
simple(Compiler "${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
value(CMAKE_VERSION)
|
||||
simple(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
simple(bindir ${CMAKE_INSTALL_BINDIR})
|
||||
simple(datadir ${CMAKE_INSTALL_DATADIR})
|
||||
simple(docdir ${CMAKE_INSTALL_DOCDIR})
|
||||
simple(includedir ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
simple(libdir ${CMAKE_INSTALL_LIBDIR})
|
||||
simple(Python "${Python3_VERSION} [${PYTHON_EXECUTABLE}] Suffix: [${PYTHON_CONFIG_SUFFIX}]")
|
||||
value(BLAS)
|
||||
|
||||
section_end()
|
||||
|
||||
############## Config ####################
|
||||
|
||||
section_begin(Config)
|
||||
|
||||
value(CMAKE_CXX_STANDARD)
|
||||
value(CMAKE_CXX_FLAGS)
|
||||
value(CMAKE_BUILD_TYPE)
|
||||
value(ENABLE_DEVELOPER_TESTS)
|
||||
value(FREECAD_USE_FREETYPE)
|
||||
value(FREECAD_USE_EXTERNAL_SMESH)
|
||||
value(BUILD_SMESH)
|
||||
value(BUILD_VR)
|
||||
value(CMAKE_PREFIX_PATH)
|
||||
value(FREECAD_QT_VERSION)
|
||||
value(PYTHON_EXECUTABLE)
|
||||
value(PYTHON_LIBRARY)
|
||||
value(FREECAD_CREATE_MAC_APP)
|
||||
value(FREECAD_USE_PYBIND11)
|
||||
value(FREECAD_USE_EXTERNAL_KDL)
|
||||
value(BUILD_ADDONMGR)
|
||||
value(BUILD_BIM)
|
||||
value(BUILD_ASSEMBLY)
|
||||
value(BUILD_CLOUD)
|
||||
value(BUILD_DRAFT)
|
||||
value(BUILD_DRAWING)
|
||||
value(BUILD_FEM)
|
||||
value(BUILD_GUI)
|
||||
value(BUILD_HELP)
|
||||
value(BUILD_IDF)
|
||||
value(BUILD_IMPORT)
|
||||
value(BUILD_INSPECTION)
|
||||
value(BUILD_JTREADER)
|
||||
value(BUILD_MATERIAL)
|
||||
value(BUILD_MESH)
|
||||
value(BUILD_MESH_PART)
|
||||
value(BUILD_OPENSCAD)
|
||||
value(BUILD_PART)
|
||||
value(BUILD_PART_DESIGN)
|
||||
value(BUILD_CAM)
|
||||
value(BUILD_PLOT)
|
||||
value(BUILD_POINTS)
|
||||
value(BUILD_REVERSEENGINEERING)
|
||||
value(BUILD_ROBOT)
|
||||
value(BUILD_SANDBOX)
|
||||
value(BUILD_SHOW)
|
||||
value(BUILD_SKETCHER)
|
||||
value(BUILD_SPREADSHEET)
|
||||
value(BUILD_START)
|
||||
value(BUILD_SURFACE)
|
||||
value(BUILD_MEASURE)
|
||||
value(BUILD_TECHDRAW)
|
||||
value(BUILD_TEST)
|
||||
value(BUILD_TUX)
|
||||
value(BUILD_WEB)
|
||||
value(CMAKE_INSTALL_PREFIX)
|
||||
value(USE_CUDA)
|
||||
value(USE_OPENCV)
|
||||
value(FREECAD_LIBPACK_USE)
|
||||
|
||||
section_end()
|
||||
|
||||
################ Libraries ##################
|
||||
|
||||
section_begin(Libraries)
|
||||
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
message(STATUS "Flags: ${CMAKE_CXX_FLAGS}")
|
||||
message(STATUS "Standard: Requires C++${CMAKE_CXX_STANDARD}")
|
||||
|
||||
# Qt5 needs/sets PYTHON_CONFIG_SUFFIX regarding Shiboken
|
||||
conditional(pybind11 pybind11_FOUND "not enabled" ${pybind11_VERSION})
|
||||
simple(Boost ${Boost_VERSION})
|
||||
simple(XercesC "${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
|
||||
simple(ZLIB "${ZLIB_VERSION_STRING}")
|
||||
simple(OCC "${OCC_VERSION_STRING} [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
|
||||
simple(OCC_Libs "[${OCC_LIBRARIES}]")
|
||||
message(STATUS "Python: ${PYTHON_VERSION_STRING} [${PYTHON_EXECUTABLE}] [${PYTHON_CONFIG_SUFFIX}]")
|
||||
|
||||
if(DEFINED PCL_FOUND)
|
||||
message(STATUS "PCL: ${PCL_VERSION}")
|
||||
else(DEFINED PCL_FOUND)
|
||||
message(STATUS "PCL: not enabled")
|
||||
endif(DEFINED PCL_FOUND)
|
||||
|
||||
if(DEFINED pybind11_FOUND)
|
||||
message(STATUS "pybind11: ${pybind11_VERSION}")
|
||||
else(DEFINED pybind11_FOUND)
|
||||
message(STATUS "pybind11: not enabled")
|
||||
endif(DEFINED pybind11_FOUND)
|
||||
|
||||
message(STATUS "Boost: ${Boost_VERSION}")
|
||||
|
||||
message(STATUS "XercesC: ${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
|
||||
|
||||
message(STATUS "ZLIB: ${ZLIB_VERSION_STRING}")
|
||||
|
||||
message(STATUS "PyCXX: ${PYCXX_VERSION} [${PYCXX_INCLUDE_DIR}]")
|
||||
|
||||
message(STATUS "OCC: ${OCC_VERSION_STRING} [${OCC_LIBRARIES}] [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
|
||||
|
||||
if(BUILD_SMESH)
|
||||
if(FREECAD_USE_EXTERNAL_SMESH)
|
||||
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
|
||||
else()
|
||||
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK} build internal")
|
||||
simple(MEDFile "${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
|
||||
simple(HDF5 ${HDF5_VERSION})
|
||||
simple(VTK ${VTK_VERSION})
|
||||
endif()
|
||||
else()
|
||||
simple(SMESH "do not build")
|
||||
endif()
|
||||
conditional(NETGEN NETGEN_FOUND
|
||||
"not enabled"
|
||||
"${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH} (${NETGEN_VERSION}) [${NETGEN_DEFINITIONS}] [${NETGEN_CXX_FLAGS}] [${NGLIB_INCLUDE_DIR}] [${NGLIB_LIBRARIES}] [${NETGEN_INCLUDE_DIRS}]"
|
||||
)
|
||||
#simple(OpenCV ${OpenCV_VERSION})
|
||||
conditional(SWIG SWIG_FOUND "not found" ${SWIG_VERSION})
|
||||
conditional(Eigen3 EIGEN3_FOUND "not found" ${EIGEN3_VERSION})
|
||||
conditional(QtConcurrent BUILD_GUI "not needed" ${QtConcurrent_VERSION})
|
||||
simple(QtCore ${QtCore_VERSION})
|
||||
simple(QtNetwork ${QtNetwork_VERSION})
|
||||
conditional(QtOpenGL BUILD_GUI "not needed" ${QtOpenGL_VERSION})
|
||||
conditional(QtPrintSupport BUILD_GUI "not needed" ${QtPrintSupport_VERSION})
|
||||
conditional(QtSvg BUILD_GUI "not needed" ${QtSvg_VERSION})
|
||||
conditional(QtUiTools BUILD_GUI "not needed" ${QtUiTools_VERSION})
|
||||
conditional(QtWidgets BUILD_GUI "not needed" ${QtWidgets_VERSION})
|
||||
simple(QtXml ${QtXml_VERSION})
|
||||
conditional(QtTest ENABLE_DEVELOPER_TESTS "not needed" ${QtTest_VERSION})
|
||||
message(STATUS "SMESH: ${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
|
||||
else(FREECAD_USE_EXTERNAL_SMESH)
|
||||
message(STATUS "SMESH: ${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK} build internal")
|
||||
message(STATUS "MEDFile: ${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
|
||||
message(STATUS "HDF5: ${HDF5_VERSION}")
|
||||
message(STATUS "VTK: ${VTK_VERSION}")
|
||||
endif(FREECAD_USE_EXTERNAL_SMESH)
|
||||
else(BUILD_SMESH)
|
||||
message(STATUS "SMESH: do not build")
|
||||
endif(BUILD_SMESH)
|
||||
|
||||
if(DEFINED NETGEN_FOUND)
|
||||
message(STATUS "NETGEN: ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH} (${NETGEN_VERSION}) [${NETGEN_DEFINITIONS}] [${NETGEN_CXX_FLAGS}] [${NGLIB_INCLUDE_DIR}] [${NGLIB_LIBRARIES}] [${NETGEN_INCLUDE_DIRS}]")
|
||||
else(DEFINED NETGEN_FOUND)
|
||||
message(STATUS "NETGEN: not enabled")
|
||||
endif(DEFINED NETGEN_FOUND)
|
||||
|
||||
#message(STATUS "OpenCV: ${OpenCV_VERSION}")
|
||||
|
||||
if(DEFINED SWIG_FOUND)
|
||||
message(STATUS "SWIG: ${SWIG_VERSION}")
|
||||
else(DEFINED SWIG_FOUND)
|
||||
message(STATUS "SWIG: not found")
|
||||
endif(DEFINED SWIG_FOUND)
|
||||
|
||||
if(DEFINED EIGEN3_FOUND)
|
||||
message(STATUS "Eigen3 ${EIGEN3_VERSION}")
|
||||
else(DEFINED EIGEN3_FOUND)
|
||||
message(STATUS "Eigen3: not found")
|
||||
endif(DEFINED EIGEN3_FOUND)
|
||||
|
||||
message(STATUS "Qt5Core: ${Qt5Core_VERSION}")
|
||||
message(STATUS "Qt5Network: ${Qt5Network_VERSION}")
|
||||
message(STATUS "Qt5Xml: ${Qt5Xml_VERSION}")
|
||||
message(STATUS "Qt5XmlPatterns: ${Qt5XmlPatterns_VERSION}")
|
||||
if (BUILD_GUI)
|
||||
conditional(DesignerPlugin BUILD_DESIGNER_PLUGIN
|
||||
"not built (BUILD_DESIGNER_PLUGIN is OFF)"
|
||||
"[${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}]"
|
||||
)
|
||||
endif()
|
||||
conditional(Shiboken Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND "not found" "${Shiboken_VERSION} [${SHIBOKEN_INCLUDE_DIR}]")
|
||||
conditional(PySide PySide${PYSIDE_MAJOR_VERSION}_FOUND "not found" "${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
conditional(PySideTools PYSIDE_TOOLS_FOUND
|
||||
"not found"
|
||||
"v: ${PySideTools_VERSION} uic: [${PYSIDE_UIC_EXECUTABLE}] rcc: [${PYSIDE_RCC_EXECUTABLE}]"
|
||||
)
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
conditional(Freetype FREETYPE_FOUND "not found" ${FREETYPE_VERSION_STRING})
|
||||
else()
|
||||
simple(Freetype "disabled")
|
||||
endif()
|
||||
simple(OpenGL_Lib [${OPENGL_gl_LIBRARY}])
|
||||
simple(OpenGLU_Lib [${OPENGL_glu_LIBRARY}])
|
||||
simple(OpenGLU_Incl [${OPENGL_INCLUDE_DIR}])
|
||||
simple(Coin3D "${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
|
||||
simple(pivy ${PIVY_VERSION})
|
||||
if (WIN32)
|
||||
if (FREECAD_USE_3DCONNEXION)
|
||||
simple(3Dconnexion "Building 3Dconnexion support with original code")
|
||||
elseif(FREECAD_USE_3DCONNEXION_NAVLIB)
|
||||
simple(3Dconnexion "Building 3Dconnexion support with NavLib")
|
||||
else()
|
||||
simple(3Dconnexion "Not building 3Dconnexion device support")
|
||||
message(STATUS "Qt5Widgets: ${Qt5Widgets_VERSION}")
|
||||
message(STATUS "Qt5PrintSupport: ${Qt5PrintSupport_VERSION}")
|
||||
message(STATUS "Qt5OpenGL: ${Qt5OpenGL_VERSION}")
|
||||
message(STATUS "Qt5Svg: ${Qt5Svg_VERSION}")
|
||||
message(STATUS "Qt5UiTools: ${Qt5UiTools_VERSION}")
|
||||
message(STATUS "Qt5Concurrent: ${Qt5Concurrent_VERSION}")
|
||||
if(BUILD_WEB)
|
||||
if (Qt5WebKitWidgets_FOUND)
|
||||
message(STATUS "Qt5WebKitWidgets: ${Qt5WebKitWidgets_VERSION}")
|
||||
endif()
|
||||
if (Qt5WebEngineWidgets_FOUND)
|
||||
message(STATUS "Qt5WebEngineWidgets: ${Qt5WebEngineWidgets_VERSION}")
|
||||
endif()
|
||||
else(BUILD_WEB)
|
||||
message(STATUS "Qt5WebKitWidgets: not needed (BUILD_WEB)")
|
||||
message(STATUS "Qt5WebEngineWidgets: not needed (BUILD_WEB)")
|
||||
endif(BUILD_WEB)
|
||||
if(BUILD_DESIGNER_PLUGIN)
|
||||
message(STATUS "Designer plugin: ${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}")
|
||||
else(BUILD_DESIGNER_PLUGIN)
|
||||
message(STATUS "Designer plugin: not built per user request (BUILD_DESIGNER_PLUGIN)")
|
||||
endif(BUILD_DESIGNER_PLUGIN)
|
||||
if(${Qt5WinExtras_FOUND})
|
||||
message(STATUS "Qt5WinExtras: ${Qt5WinExtras_VERSION}")
|
||||
endif()
|
||||
else()
|
||||
conditional(SPNAV SPNAV_FOUND "not found" "[${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
|
||||
endif()
|
||||
conditional(Matplotlib MATPLOTLIB_FOUND "not found" "${MATPLOTLIB_VERSION} PathDirs: ${MATPLOTLIB_PATH_DIRS}")
|
||||
|
||||
else(BUILD_GUI)
|
||||
message(STATUS "Qt5Widgets: not needed")
|
||||
message(STATUS "Qt5PrintSupport: not needed")
|
||||
message(STATUS "Qt5OpenGL: not needed")
|
||||
message(STATUS "Qt5Svg: not needed")
|
||||
message(STATUS "Qt5UiTools: not needed")
|
||||
message(STATUS "Qt5Concurrent: not needed")
|
||||
message(STATUS "Qt5WebKitWidgets: not needed")
|
||||
endif(BUILD_GUI)
|
||||
|
||||
if(DEFINED MACPORTS_PREFIX)
|
||||
if(DEFINED Shiboken_FOUND)
|
||||
message(STATUS "Shiboken: ${Shiboken_VERSION} [${SHIBOKEN_INCLUDE_DIR}]")
|
||||
else(DEFINED Shiboken_FOUND)
|
||||
message(STATUS "Shiboken: not found (only searched if MACPORTS_PREFIX is defined)")
|
||||
endif(DEFINED Shiboken_FOUND)
|
||||
if(DEFINED PySide_FOUND)
|
||||
message(STATUS "PySide: ${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
message(STATUS " IncludeDir: Unable to find, python version mismatch?")
|
||||
endif(NOT PYSIDE_INCLUDE_DIR)
|
||||
else(DEFINED PySide_FOUND)
|
||||
message(STATUS "PySide: not found (only searched if MACPORTS_PREFIX is defined)")
|
||||
endif(DEFINED PySide_FOUND)
|
||||
endif(DEFINED MACPORTS_PREFIX)
|
||||
|
||||
if(DEFINED Shiboken2_FOUND)
|
||||
message(STATUS "Shiboken2: ${Shiboken2_VERSION} [${Shiboken2_DIR}] [${SHIBOKEN_INCLUDE_DIR}]")
|
||||
else(DEFINED Shiboken2_FOUND)
|
||||
message(STATUS "Shiboken2: not found")
|
||||
endif(DEFINED Shiboken2_FOUND)
|
||||
if(DEFINED PySide2_FOUND)
|
||||
message(STATUS "PySide2: ${PySide2_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
message(STATUS " IncludeDir: Unable to find, python version mismatch?")
|
||||
endif(NOT PYSIDE_INCLUDE_DIR)
|
||||
else(DEFINED PySide2_FOUND)
|
||||
message(STATUS "PySide2: not found")
|
||||
endif(DEFINED PySide2_FOUND)
|
||||
if(DEFINED PYSIDE2_TOOLS_FOUND)
|
||||
message(STATUS "PySide2Tools: [${PYSIDE2UICBINARY}] [${PYSIDE2RCCBINARY}]")
|
||||
else(DEFINED PYSIDE2_TOOLS_FOUND)
|
||||
message(STATUS "PySide2Tools: not found")
|
||||
endif(DEFINED PYSIDE2_TOOLS_FOUND)
|
||||
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
if(DEFINED FREETYPE_FOUND)
|
||||
message(STATUS "Freetype: ${FREETYPE_VERSION_STRING}")
|
||||
else(DEFINED FREETYPE_FOUND)
|
||||
message(STATUS "Freetype: not found")
|
||||
endif(DEFINED FREETYPE_FOUND)
|
||||
else(FREECAD_USE_FREETYPE)
|
||||
message(STATUS "Freetype: disabled")
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
|
||||
message(STATUS "OpenGL: ${OPENGL_gl_LIBRARY}")
|
||||
message(STATUS "OpenGLU: [${OPENGL_glu_LIBRARY}][${OPENGL_INCLUDE_DIR}]")
|
||||
|
||||
message(STATUS "Coin3D: ${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
|
||||
message(STATUS "Pivy: ${PIVY_VERSION}")
|
||||
|
||||
|
||||
if (WIN32)
|
||||
#message(STATUS "SPNAV: not available yet for your OS") # FREECAD_USE_3DCONNEXION instead...
|
||||
else(WIN32)
|
||||
if(DEFINED SPNAV_FOUND)
|
||||
message(STATUS "SPNAV: [${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
|
||||
else(DEFINED SPNAV_FOUND)
|
||||
message(STATUS "SPNAV: not found")
|
||||
endif(DEFINED SPNAV_FOUND)
|
||||
endif(WIN32)
|
||||
|
||||
if(MATPLOTLIB_FOUND)
|
||||
message(STATUS "Matplotlib: ${MATPLOTLIB_VERSION}")
|
||||
else(MATPLOTLIB_FOUND)
|
||||
message(STATUS "Matplotlib: not found")
|
||||
endif(MATPLOTLIB_FOUND)
|
||||
|
||||
if(BUILD_VR)
|
||||
conditional(Rift RIFT_FOUND "not found" ${Rift_VERSION})
|
||||
else()
|
||||
simple(Rift "not enabled (BUILD_VR)")
|
||||
if(DEFINED RIFT_FOUND)
|
||||
message(STATUS "Rift: ${Rift_VERSION}")
|
||||
else(DEFINED RIFT_FOUND)
|
||||
message(STATUS "Rift: not found")
|
||||
endif(DEFINED RIFT_FOUND)
|
||||
else(BUILD_VR)
|
||||
message(STATUS "Rift: not enabled (BUILD_VR)")
|
||||
endif(BUILD_VR)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
message(STATUS "Doxygen: ${DOXYGEN_VERSION}")
|
||||
message(STATUS "Language: ${DOXYGEN_LANGUAGE}")
|
||||
if(COIN3D_DOC_FOUND)
|
||||
message(STATUS "Coin3D_DOC: found [${COIN3D_DOC_PATH}]")
|
||||
else(COIN3D_DOC_FOUND)
|
||||
message(STATUS "Coin3D_DOC: not found")
|
||||
endif(COIN3D_DOC_FOUND)
|
||||
else(DOXYGEN_FOUND)
|
||||
message(STATUS "Doxygen: not found")
|
||||
endif(DOXYGEN_FOUND)
|
||||
|
||||
if(MSVC)
|
||||
# Copy libpack dependency directories to build folder for user as part of overall build process
|
||||
if(FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
|
||||
if(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying libpack dependency directories to build directory for Windows MSVC build.\n")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/assistant.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/qt.conf DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
|
||||
message(STATUS "... end copying.\n=======================================\n")
|
||||
endif(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
|
||||
|
||||
if(COPY_LIBPACK_BIN_TO_BUILD)
|
||||
if(FREECAD_COPY_LIBPACK_BIN_TO_BUILD)
|
||||
message("=======================================\n"
|
||||
"Copying libpack 'bin' directory to build directory.\n")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_BINARY_DIR})
|
||||
message("... done copying libpack 'bin' directory.\n=======================================\n")
|
||||
endif()
|
||||
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying plugins to build directory.")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_INSTALL_DEPEND_DIRS)
|
||||
# Test install command for installing/copying directories
|
||||
message(STATUS "=======================================")
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_INSTALL_PREFIX}/translations)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
message(STATUS "Created install commands for INSTALL target.\n")
|
||||
endif(FREECAD_INSTALL_DEPEND_DIRS)
|
||||
endif(FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
|
||||
endif()
|
||||
conditional(Doxygen DOXYGEN_FOUND "not found" "${DOXYGEN_VERSION} Language: ${DOXYGEN_LANGUAGE}")
|
||||
conditional(Coin3D_DOC COIN3D_DOC_FOUND "not found" ${COIN3D_DOC_PATH})
|
||||
conditional(PYCXX PYCXX_FOUND "not found" "${PYCXX_VERSION} Incl: ${PYCXX_INCLUDE_DIR} Src:${PYCXX_SOURCE_DIR}")
|
||||
conditional(fmt fmt_FOUND "Sources downloaded to ${fmt_SOURCE_DIR}" "${fmt_VERSION}")
|
||||
conditional(yaml-cpp yaml-cpp_FOUND "not found" "${yaml-cpp_VERSION}")
|
||||
|
||||
section_end()
|
||||
|
||||
endmacro()
|
||||
# Print message to start build process
|
||||
message("=================================================\n"
|
||||
"Now run 'cmake --build ${CMAKE_BINARY_DIR}' to build ${PROJECT_NAME}\n"
|
||||
"=================================================\n")
|
||||
endmacro(PrintFinalReport)
|
||||
|
||||
@@ -21,9 +21,8 @@ macro(SetGlobalCompilerAndLinkerSettings)
|
||||
|
||||
if(MSVC)
|
||||
# set default compiler settings
|
||||
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR -DNOMINMAX)
|
||||
add_compile_options(/Zm150 /bigobj)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zm150 /bigobj")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG /Zm150 /bigobj")
|
||||
# set default libs
|
||||
set (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
@@ -34,24 +33,17 @@ macro(SetGlobalCompilerAndLinkerSettings)
|
||||
if(FREECAD_RELEASE_PDB)
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
endif(FREECAD_RELEASE_PDB)
|
||||
if(FREECAD_RELEASE_SEH)
|
||||
# remove /EHsc or /EHs flags because they are incompatible with /EHa
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES "Release")
|
||||
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
string(REPLACE "/EHs" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/EHs" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHa")
|
||||
endif()
|
||||
endif(FREECAD_RELEASE_SEH)
|
||||
if(CCACHE_PROGRAM)
|
||||
# By default Visual Studio generators will use /Zi which is not compatible
|
||||
# with ccache, so tell Visual Studio to use /Z7 instead.
|
||||
string(REGEX REPLACE "/Z[iI]" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
string(REGEX REPLACE "/Z[iI]" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
string(REGEX REPLACE "/Z[iI]" "/Z7" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
endif(CCACHE_PROGRAM)
|
||||
option(FREECAD_USE_MP_COMPILE_FLAG "Add /MP flag to the compiler definitions. Speeds up the compile on multi processor machines" ON)
|
||||
|
||||
option(FREECAD_USE_MP_COMPILE_FLAG "Add /MP flag to the compiler definitions. Speeds up the compile on multi processor machines" ON)
|
||||
if(FREECAD_USE_MP_COMPILE_FLAG)
|
||||
# set "Build with Multiple Processes"
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
@@ -91,5 +83,4 @@ macro(SetGlobalCompilerAndLinkerSettings)
|
||||
link_libraries(-lgdi32)
|
||||
endif()
|
||||
endif(MINGW)
|
||||
|
||||
endmacro(SetGlobalCompilerAndLinkerSettings)
|
||||
|
||||
@@ -5,6 +5,6 @@ macro(SetLibraryVersions)
|
||||
set(HAVE_OCC_VERSION 1)
|
||||
endif(OCC_INCLUDE_DIR AND EXISTS ${OCC_INCLUDE_DIR}/Standard_Version.hxx)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/LibraryVersions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/LibraryVersions.h)
|
||||
configure_file(LibraryVersions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/LibraryVersions.h)
|
||||
|
||||
endmacro(SetLibraryVersions)
|
||||
|
||||
@@ -1,44 +1,11 @@
|
||||
macro(SetupCoin3D)
|
||||
# -------------------------------- Coin3D --------------------------------
|
||||
# -------------------------------- Coin3D --------------------------------
|
||||
|
||||
if (WIN32 AND MINGW)
|
||||
find_path(COIN3D_INCLUDE_DIRS Inventor/So.h)
|
||||
find_library(COIN3D_LIBRARIES Coin)
|
||||
endif ()
|
||||
|
||||
# Try MODULE mode
|
||||
find_package(Coin3D)
|
||||
if (NOT COIN3D_FOUND)
|
||||
# Try CONFIG mode
|
||||
find_package(Coin CONFIG REQUIRED)
|
||||
if (Coin_FOUND)
|
||||
set(COIN3D_INCLUDE_DIRS ${Coin_INCLUDE_DIR})
|
||||
set(COIN3D_LIBRARIES ${Coin_LIBRARIES})
|
||||
endif ()
|
||||
ENDIF ()
|
||||
|
||||
IF (NOT COIN3D_VERSION)
|
||||
file(READ "${COIN3D_INCLUDE_DIRS}/Inventor/C/basic.h" _coin3d_basic_h)
|
||||
string(REGEX MATCH "define[ \t]+COIN_MAJOR_VERSION[ \t]+([0-9?])" _coin3d_major_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+COIN_MINOR_VERSION[ \t]+([0-9?])" _coin3d_minor_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+COIN_MICRO_VERSION[ \t]+([0-9?])" _coin3d_micro_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MICRO_VERSION "${CMAKE_MATCH_1}")
|
||||
set(COIN3D_VERSION "${COIN3D_MAJOR_VERSION}.${COIN3D_MINOR_VERSION}.${COIN3D_MICRO_VERSION}")
|
||||
ENDIF ()
|
||||
|
||||
IF (NOT PIVY_VERSION)
|
||||
message(STATUS "Checking Pivy version by importing it in a Python program...")
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')"
|
||||
OUTPUT_VARIABLE PIVY_VERSION
|
||||
RESULT_VARIABLE RETURN_CODE)
|
||||
if (RETURN_CODE EQUAL 0)
|
||||
message(STATUS "Found Pivy ${PIVY_VERSION}")
|
||||
else ()
|
||||
message(ERROR "Failed to import Pivy using ${Python3_EXECUTABLE}")
|
||||
endif ()
|
||||
ENDIF ()
|
||||
find_package(Coin3D REQUIRED)
|
||||
if(NOT COIN3D_FOUND)
|
||||
message(FATAL_ERROR "=================\n"
|
||||
"Coin3D not found.\n"
|
||||
"=================\n")
|
||||
endif(NOT COIN3D_FOUND)
|
||||
|
||||
endmacro(SetupCoin3D)
|
||||
|
||||
@@ -11,14 +11,14 @@ macro(SetupEigen)
|
||||
"=================\n")
|
||||
endif(NOT EIGEN3_FOUND)
|
||||
|
||||
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.1")
|
||||
if (${EIGEN3_VERSION} VERSION_LESS "3.3.1")
|
||||
message(WARNING "Disable module flatmesh because it requires "
|
||||
"minimum Eigen3 version 3.3.1 but version ${EIGEN3_VERSION} was found")
|
||||
set (BUILD_FLAT_MESH OFF)
|
||||
endif()
|
||||
|
||||
# Older versions raise the warning -Wdeprecated-copy with clang10/gcc10
|
||||
if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.8")
|
||||
if (${EIGEN3_VERSION} VERSION_LESS "3.3.8")
|
||||
unset(_flag_found CACHE)
|
||||
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
|
||||
if (_flag_found)
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
macro(SetupLibFmt)
|
||||
|
||||
# This internet check idea is borrowed from:
|
||||
# https://stackoverflow.com/questions/62214621/how-to-check-for-internet-connection-with-cmake-automatically-prevent-fails-if
|
||||
|
||||
if(FREECAD_USE_EXTERNAL_FMT)
|
||||
find_package(fmt QUIET)
|
||||
endif()
|
||||
|
||||
if(fmt_FOUND)
|
||||
message(STATUS "find_package() was used to locate fmt version ${fmt_VERSION}")
|
||||
else()
|
||||
|
||||
message(STATUS "Checking for connection to GitHub...")
|
||||
if (WIN32)
|
||||
set(ping_command "ping /n 1 /w 3 github.com")
|
||||
else()
|
||||
set(ping_command "ping -c 1 -W 3 github.com")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${ping_command}
|
||||
RESULT_VARIABLE NO_CONNECTION
|
||||
)
|
||||
if(NO_CONNECTION GREATER 0)
|
||||
set(FETCHCONTENT_UPDATES_DISCONNECTED ON)
|
||||
message(WARNING "NO INTERNET CONNECTION: Using disconnected mode for FetchContent updates")
|
||||
else()
|
||||
message(STATUS "GitHub connection established for FetchContent")
|
||||
set(FETCHCONTENT_UPDATES_DISCONNECTED OFF)
|
||||
endif()
|
||||
|
||||
include(FetchContent)
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
FetchContent_Declare(fmt
|
||||
URL https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.zip
|
||||
URL_MD5 e6754011ff56bfc37631fcc90961e377
|
||||
)
|
||||
FetchContent_MakeAvailable(fmt)
|
||||
set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
if(${fmt_POPULATED})
|
||||
message(STATUS "fmt was downloaded using FetchContent into ${fmt_SOURCE_DIR}")
|
||||
else()
|
||||
message(ERROR "Failed to install the fmt library")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -1,4 +0,0 @@
|
||||
macro(SetupOndselSolverCpp)
|
||||
# -------------------------------- OndselSolver --------------------------------
|
||||
find_package(OndselSolver REQUIRED)
|
||||
endmacro(SetupOndselSolverCpp)
|
||||