Compiling (Speeding up)/ro: Difference between revisions

From FreeCAD Documentation
No edit summary
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
When developing FreeCAD one needs to build from source and the compiling/build phase can start eating in to precious development time. Here are some tips to shorten that process and make build times more efficient.


{{Docnav
|[[FreeCAD_Docker_CLI_mode|FreeCAD Docker CLI mode]]
|[[Third_Party_Libraries|Third Party Libraries]]
}}

{{TOCright}}

==Overview==

<div class="mw-translate-fuzzy">
Atunci când dezvoltați FreeCAD, trebuie să compilați din surse, iar faza de compilare / construire poate începe să mînânce un timp valoros din timpul de dezvoltare. Iată câteva sfaturi pentru a scurta acest proces și a face timpul de compilare/construcție mai eficient.
</div>

<div class="mw-translate-fuzzy">
=== CCache ===
=== CCache ===
Install ccache to cache builds
Instalează ccache în compilările cache
</div>


<div class="mw-translate-fuzzy">
=== Disable Modules ===
=== Dezactivarea modulelor ===
Use cmake-curses-gui, cmake-qt-gui, or cmake flags to disable modules you aren't working on
Utilizați cmake-curses-gui, cmake-qt-gui sau flag cmake pentru a dezactiva modulele pe care nu lucrați
</div>


For example, to avoid building the FEM and Mesh workbenches:

{{Code|code=
cmake -DBUILD_FEM=OFF -DBUILD_MESH=OFF ../freecad-source
}}

Use {{incode|cmake-gui}}, {{incode|cmake-curses-gui}}, or {{incode|cmake-qt-gui}} to display all the possible variables that can be edited in the configuration; using these interfaces you can easily switch on or off different workbenches.

<div class="mw-translate-fuzzy">
=== make -j ===
=== make -j ===
Use make -j # to specify the number of jobs. A suggested value is your number of computer cores, e.g.
Utilizați -j # pentru a specifica numerul sarcinilor/jobs. O sugestie ar fi, numărul de nuclee de pe computer, e.g.
<pre>make -j $(nproc)</pre>
<pre>make -j $(nproc)</pre>
</div>

Run four compilation commands in parallel:

{{Code|code=
make -j4
}}

Compile as many files in parallel as the number of CPU cores in your system. This is useful if you have many cores and want to use them all to compile the software.

{{code|code=
make -j$(nproc)
}}

Compile as many files in parallel as the number of CPU cores in your system, minus two. Use this so that your system is still responsive to do some other task; for example, two cores will allow you to use a browser, while the rest of the cores keep compiling the software on the background.

{{code|code=
make -j$(nproc --ignore=2)
}}


<div class="mw-translate-fuzzy">
=== distcc ===
=== distcc ===
Distcc can be used for distributed compilation on a network.
Distcc poate fi utilizat pentru compilarea distribuită în rețea.
</div>


{{Docnav|CompileOnMac|Third Party Libraries}}


{{Docnav/ro
[[Category:Developer Documentation/ro]]
|[[FreeCAD_Docker_CLI_mode/ro|FreeCAD Docker CLI mode]]
|[[Third_Party_Libraries/ro|Third Party Libraries]]
}}


{{Userdocnavi{{#translation:}}}}
{{clear}}
[[Category:Developer_Documentation{{#translation:}}]]
[[Category:Developer{{#translation:}}]]

Revision as of 20:26, 12 November 2021

Overview

Atunci când dezvoltați FreeCAD, trebuie să compilați din surse, iar faza de compilare / construire poate începe să mînânce un timp valoros din timpul de dezvoltare. Iată câteva sfaturi pentru a scurta acest proces și a face timpul de compilare/construcție mai eficient.

CCache

Instalează ccache în compilările cache

Dezactivarea modulelor

Utilizați cmake-curses-gui, cmake-qt-gui sau flag cmake pentru a dezactiva modulele pe care nu lucrați

For example, to avoid building the FEM and Mesh workbenches:

cmake -DBUILD_FEM=OFF -DBUILD_MESH=OFF ../freecad-source

Use cmake-gui, cmake-curses-gui, or cmake-qt-gui to display all the possible variables that can be edited in the configuration; using these interfaces you can easily switch on or off different workbenches.

make -j

Utilizați -j # pentru a specifica numerul sarcinilor/jobs. O sugestie ar fi, numărul de nuclee de pe computer, e.g.

make -j $(nproc)

Run four compilation commands in parallel:

make -j4

Compile as many files in parallel as the number of CPU cores in your system. This is useful if you have many cores and want to use them all to compile the software.

make -j$(nproc)

Compile as many files in parallel as the number of CPU cores in your system, minus two. Use this so that your system is still responsive to do some other task; for example, two cores will allow you to use a browser, while the rest of the cores keep compiling the software on the background.

make -j$(nproc --ignore=2)

distcc

Distcc poate fi utilizat pentru compilarea distribuită în rețea.