When using Ninja build system, CMake can specify job pools for number of concurrent compilers
and concurrent linkers. This PR employes the heuristic of max number of compilers as available
physical ram / 1 GiB and a single linker instance to prevent using excessive RAM. Modern
linkers are multithreaded and should not be run concurrently due to risk of resource exhaustion.
* CMake: set optimization of debug builds to -Og.
* Update cMake/FreeCAD_Helpers/SetGlobalCompilerAndLinkerSettings.cmake
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
* Fix indentation level
---------
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Adds a new build option BUILD_MATERIAL_EXTERNAL which is off by default.
When disabled, the external interface is not built. This allows the
code to be tested thoroughly before reaching the end user.
* remove support to oldest occ <7.5
The os ubuntu 22.04 not supported use occ 7.5.1.
There is a lot of code implemented to support even older versions.
The patch removes support for versions lower than occ 7.5.0
* .
* move include library
#pieterhijma change request :
* removed deprecated functions
get/setAngle functions has been removed with OCC 7.5
Since ac77cd779e ("CMake: PySide cleanup") compatibility variables depends
on PySide6_FOUND, but setting that was later removed, leaving pip installed
PySide6 undetected.
Fixes: 9119d392c9 ("CMake: Fix PySide6 search")
Previous versions did not include pybind11, but the error message from that failure is not terribly informative. This way the exact means of fixing the problem is provided in the message.
* clean FindOCC.cmake
cmake version is always major then 3.16.3
.
* Update cMake/FindOCC.cmake
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
* Update cMake/FindOCC.cmake
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
---------
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
Previously the code defined compatiblity usings in `QtOpenGL.h` header,
which I think was added for backwards compatiblity with previous Qt
OpenGL widgets.
As far as I can tell, this is not necessary anymore, and can be cleaned
up.
This extends the existing XML-based template generator to allow an
additional kind of Python-based input.
The Python code is read as source code to an AST to a typed model
equivalent to the existing XML model, and processed by the existing
code templates into compatible code.
This provides a few benefits, namely readability is much increased,
but more importantly, it allows associating the APIs with Python's new
typing information, which will allow to provide accurate type hinting
without additional downstream processing in the future.
Right now this is just a proof-of-concept but if the approach is
well received, then a more complete implementation can be done with
further conversion of existing binding files.
Here is an example of how it looks, though I still think the metadata
is too verbose and can be made to look nicer with some further work.
```python
from ..Base.Metadata import metadata
from ..Base.Persistence import PersistencePy
from typing import Any, Optional, List
@metadata(
Father="PersistencePy",
Name="DocumentPy",
Twin="Document",
TwinPointer="Document",
Include="Gui/Document.h",
Namespace="Gui",
FatherInclude="Base/PersistencePy.h",
FatherNamespace="Base"
)
class DocumentPy(PersistencePy):
"""
This is a Document class.
Author: Werner Mayer (wmayer@users.sourceforge.net)
Licence: LGPL
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
"""
Constructor for DocumentPy.
"""
super(DocumentPy, self).__init__(*args, **kwargs)
pass
def show(self, objName: str) -> None:
"""
show(objName) -> None
Show an object.
Parameters:
objName (str): Name of the `Gui.ViewProvider` to show.
"""
pass
```