Compiling (Speeding up)/it: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Userdocnavi/it}}")
(Updating to match new version of source page)
Line 2: Line 2:
{{docnav/it|[[CompileOnMac/it|Compilare in Mac]]|[[Third Party Libraries/it|Librerie di terze parti]]}}
{{docnav/it|[[CompileOnMac/it|Compilare in Mac]]|[[Third Party Libraries/it|Librerie di terze parti]]}}


<div class="mw-translate-fuzzy">
Quando si sviluppa FreeCAD si ha la necessità di costruire dai sorgenti e la fase di compilazione o costruzione può assorbire del tempo che è invece prezioso per lo sviluppo. Ecco alcuni suggerimenti per abbreviare questo processo e rendere più efficiente il tempo di costruzione.
Quando si sviluppa FreeCAD si ha la necessità di costruire dai sorgenti e la fase di compilazione o costruzione può assorbire del tempo che è invece prezioso per lo sviluppo. Ecco alcuni suggerimenti per abbreviare questo processo e rendere più efficiente il tempo di costruzione.
</div>


<div class="mw-translate-fuzzy">
=== CCache ===
=== CCache ===
Installare ccache per la costruzione cache
Installare ccache per la costruzione cache
</div>


<div class="mw-translate-fuzzy">
=== Disabilitare i Moduli ===
=== Disabilitare i Moduli ===
Usare cmake-curses-gui, cmake-qt-gui, o i flag di cmake per disabilitare i moduli su cui non si sta lavorando
Usare cmake-curses-gui, cmake-qt-gui, o i flag di cmake per disabilitare i moduli su cui non si sta lavorando
</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 ===
Usare make -j # per specificare il numero di processi (thread) di compilazione simultanea. Il valore suggerito è quello corrispondente al numero di processori del proprio computer, ad es.
Usare make -j # per specificare il numero di processi (thread) di compilazione simultanea. Il valore suggerito è quello corrispondente al numero di processori del proprio computer, ad es.
<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 può essere utilizzato per la compilazione distribuita su una rete.
Distcc può essere utilizzato per la compilazione distribuita su una rete.
</div>


{{docnav/it|[[CompileOnMac/it|Compilare in Mac]]|[[Third Party Libraries/it|Librerie di terze parti]]}}
{{docnav/it|[[CompileOnMac/it|Compilare in Mac]]|[[Third Party Libraries/it|Librerie di terze parti]]}}

Revision as of 10:05, 13 July 2019

Quando si sviluppa FreeCAD si ha la necessità di costruire dai sorgenti e la fase di compilazione o costruzione può assorbire del tempo che è invece prezioso per lo sviluppo. Ecco alcuni suggerimenti per abbreviare questo processo e rendere più efficiente il tempo di costruzione.

CCache

Installare ccache per la costruzione cache

Disabilitare i Moduli

Usare cmake-curses-gui, cmake-qt-gui, o i flag di cmake per disabilitare i moduli su cui non si sta lavorando

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

Usare make -j # per specificare il numero di processi (thread) di compilazione simultanea. Il valore suggerito è quello corrispondente al numero di processori del proprio computer, ad es.

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 può essere utilizzato per la compilazione distribuita su una rete.