Commit Graph

465 Commits

Author SHA1 Message Date
Jacob Oursland
9b8efeefed CMake: use job pools to restrict number of concurrent compilers and linkers.
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.
2025-04-15 13:04:22 +02:00
Jackson Oursland
df1c5e73b2 CMake: set optimization of debug builds to -Og. (#20780)
* 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>
2025-04-14 21:34:46 +00:00
Chris Hennes
7be483da88 CMake: Only set /NODEFAULTLIB for MSVC < 19.30
Corresponds to anything earlier than VS 2022.
2025-04-07 11:23:47 -05:00
Andrea
51d72ea11b Cosmetic Fix
Fix double "--" during print configuration  :

----   Version:  7.1.9
-- -- Found OpenCASCADE version: 7.8.1
-- -- OpenCASCADE include directory: /usr/include/opencascade
-- -- OpenCASCADE shared libraries directory: /usr/lib/x86_64-linux-gnu
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- VTK components:
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so  found components: OpenGL GLX

.
2025-04-05 23:00:07 -05:00
Chris Hennes
62b0e6eb4f CMake: Allow external libE57Format 2025-04-01 07:55:25 +02:00
David Carter
05e76dd624 Materials: Build external materials support conditionally
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.
2025-03-31 22:24:53 +02:00
mosfet80
5e899fb5b9 Update SetupLibFmt.cmake
update fmt to last version
2025-03-31 10:49:16 -05:00
Joao Matos
1224143a99 CMake: Fix generate_from_py macro for temporary pyi files. 2025-03-26 12:18:02 +01:00
Adrian Insaurralde
9cf50b4eb8 Enable pcl by default on non windows systems 2025-03-25 10:14:56 +01:00
Andrea
ad3d274679 Update Eigen Requirement
ubuntu 22.04 use eigen 3.4. The minimum eigen version is raised to 3.4.
Old cmake code is also removed.
2025-03-24 21:09:48 -05:00
Joao Matos
ad4275fe50 CMake: Fix build dependency tracking for Python bindings generation.
This caused a rebuild to always happen due to incorrect dependency
tracking.

Fixes https://github.com/FreeCAD/FreeCAD/issues/20402.
2025-03-24 21:43:31 +01:00
Furgo
af0c256dd1 Do not specify a version in FindOCC.cmake 2025-03-22 16:49:33 -03:00
mosfet80
3026bd413d Remove support to oldest occ <7.5 (#20084)
* 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
2025-03-21 13:06:47 +01:00
Chris Hennes
ede962835d Merge pull request #17779 from wwmayer/noboostpy
Remove support for Boost.Python
2025-03-17 00:00:32 -05:00
tritao
b44f679512 Fix regression in Python setup with old Shiboken.
https://github.com/FreeCAD/FreeCAD/pull/19635#issuecomment-2725612407
2025-03-14 21:11:11 +00:00
Chris Hennes
44908ad721 Merge pull request #19428 from tritao/base-tracy-profiler
Base: Add Tracy frame profiling support.
2025-03-14 04:12:05 +00:00
Joao Matos
0feab195ac Base: Add build support and instrumentation for the Tracy profiler. 2025-03-14 03:41:30 +00:00
Chris Hennes
f9fd8b299c Merge pull request #20107 from 3x380V/pip_pyside6
CMake: Fix PySide6 pip search
2025-03-11 04:21:12 +00:00
Chris Hennes
87864c5b3f Merge pull request #19998 from chennes/silenceCoinWarning
CMake: Silence Coin3D deprecation warning
2025-03-10 15:49:59 +00:00
Ladislav Michl
e3efee641b CMake: Fix PySide6 pip search
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")
2025-03-10 14:15:49 +01:00
Chris Hennes
075ba7f0ef CMake: Silence Coin3D deprecation warning 2025-03-04 20:37:47 -06:00
Chris Hennes
2aa8a8b833 CMake: If using Libpack, require at least v3.1
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.
2025-03-04 19:26:18 -06:00
mosfet80
d20a9f1a40 clean FindOCC.cmake (#19755)
* 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>
2025-03-04 16:10:12 -06:00
wmayer
bf5baa5de4 CMake: Remove FREECAD_USE_PYBIND11 as a build option 2025-03-04 08:07:46 -06:00
Maxim Moskalets
ca86613f5b Add support of compile/link jobs pooling 2025-03-03 18:51:27 -06:00
Joao Matos
ed27ab85de CMake: Add GCC/Clang -fdiagnostics=color compiler option. 2025-03-03 18:13:39 +01:00
Chris Hennes
1ea26a4a94 Merge pull request #19450 from tritao/base-python-api-model
Base: Modernize Python bindings APIs
2025-03-02 16:34:25 -06:00
Chris Hennes
98537f00b1 Merge pull request #19626 from tritao/qt-gl-cleanup
Gui: Remove QtOpenGL.h.
2025-03-02 16:22:57 -06:00
Joao Matos
2e879c8982 Tools: Update binding generator. 2025-03-01 16:23:54 +00:00
marioalexis
50a4605232 CMake: Add FREECAD_USE_PYSIDE and FREECAD_USE_SHIBOKEN to final report 2025-02-26 14:25:40 -03:00
marioalexis
b0a3fe749d CMake: Fix PySide6 search 2025-02-26 14:25:40 -03:00
marioalexis
612d7b541c CMake: Fix PySide major version comparison 2025-02-26 14:25:40 -03:00
Joao Matos
c3e5069190 Gui: Cleanup Qt OpenGL usings in QtOpenGL.h.
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.
2025-02-25 23:03:51 +00:00
Chris Hennes
19b0e0e279 CMake: Force OpenGL to use legacy 2025-02-25 13:26:02 -06:00
Chris Hennes
dce7627c33 Merge pull request #19516 from tritao/tools-python-bindings-gen
Tools: Introduce a new Python-based C++ bindings generator
2025-02-24 16:39:24 +00:00
Joao Matos
15076cb504 Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Chris Hennes
ab4f56fd04 CMake: Correct formatting to match existing 2025-02-22 20:48:44 -06:00
Chris Hennes
54997b4486 CMake: Remove support for old CMake versions 2025-02-22 20:48:44 -06:00
Chris Hennes
60a43400e2 CMake: Correct use of CACHE 2025-02-22 20:48:44 -06:00
Chris Hennes
bfeed4c05e CMake: PySide cleanup 2025-02-22 20:48:44 -06:00
Chris Hennes
0f4da7a529 CMake: Expand note about BOOST_PP_VARIADICS=1 2025-02-22 20:48:43 -06:00
Chris Hennes
b09e1436cf CMake: Update compiler and standard mins 2025-02-22 20:48:43 -06:00
Jacob Oursland
8fa089ba9c CMake: Remove unsupported DEPENDS args to CMake macros. 2025-02-22 20:41:15 -06:00
bofdahof
0058b0d61c Remove OpenCascade Community Edition 2025-02-21 14:21:21 -06:00
bofdahof
11ed923503 Remove second vtk listing. See #19607 2025-02-21 14:18:10 -06:00
tritao
b97e695359 Tools: Introduce a Python-based API bindings template generator.
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
```
2025-02-21 16:32:13 +00:00
Joao Matos
6452050808 CMake: Update minimum Python version to 3.10 2025-02-21 09:45:13 -06:00
tritao
537b51d038 CMake: Rename generate_from_py macro to generate_embed_from_py. 2025-02-21 13:18:36 +00:00
lorenz
dcaf752b16 add option to disable check for pivy at build-time (#19718)
Co-authored-by: João Matos <joao@tritao.eu>
2025-02-20 08:32:58 -03:00
Joao Matos
aace8f7bee CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00