Компиляция (Ускорение)
При разработке FreeCAD требуется сборка из исходного кода, и фаза компиляции / сборки может отнимать драгоценное время на разработку. Вот несколько советов, чтобы сократить этот процесс и сделать время сборки более эффективным.
CCache
Установите ccache для кеширования сборок
Отключаемые модули
Используйте флаги cmake-curses-gui, cmake-qt-gui или cmake для отключения модулей, с которыми вы не работаете
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
Используйте make -j #, чтобы указать количество заданий. Предлагаемое значение - это количество ядер компьютера, например,
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 может использоваться для распределенной компиляции в сети.
- Начинающим
- Установка: Загрузка, Windows, Linux, Mac, Дополнительных компонентов, Docker, AppImage, Ubuntu Snap
- Базовая: О FreeCAD, Интерфейс, Навигация мыши, Методы выделения, Имя объекта, Настройки, Верстаки, Структура документа, Свойства, Помоги FreeCAD, Пожертвования
- Помощь: Учебники, Видео учебники
- Верстаки: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework