All Projects → dcourtois → premake-compilationunit

dcourtois / premake-compilationunit

Licence: WTFPL license
Premake module adding support for compilation speed up through the use of the "single compilation unit" pattern, slightly modified.

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to premake-compilationunit

ElvUI
ElvUI for World of Warcraft - Vanilla (1.12.1)
Stars: ✭ 67 (+318.75%)
Mutual labels:  addon
catalog
Catalog of community maintained components and traits.
Stars: ✭ 104 (+550%)
Mutual labels:  addon
dwains-dashboard-addons
Dwains Dashboard Community Addons
Stars: ✭ 112 (+600%)
Mutual labels:  addon
premake-next
An experimental, exploratory take on new ideas and approaches for Premake
Stars: ✭ 17 (+6.25%)
Mutual labels:  premake
dut-iptv
Github repo containing Kodi addons for CanalDigitaal IPTV, F1 TV, KPN/Telfort/XS4All iTV, NLZiet, Telenet, T-Mobile TV, Videoland and Ziggo Go
Stars: ✭ 26 (+62.5%)
Mutual labels:  addon
addon-portainer
Portainer - Home Assistant Community Add-ons
Stars: ✭ 83 (+418.75%)
Mutual labels:  addon
tab-counter
A button badge that shows the number of tabs open in a window
Stars: ✭ 35 (+118.75%)
Mutual labels:  addon
BetterAlign
A better version of Align for Vanilla WoW
Stars: ✭ 16 (+0%)
Mutual labels:  addon
jscc
Tiny and powerful preprocessor for conditional comments and replacement of compile-time variables in text files
Stars: ✭ 44 (+175%)
Mutual labels:  compilation
adam
Addon which enhances all user profiles of confluence. It also adds an advanced people directory. The whole addon is configurable by means of an XML, can be localized, supports Velocity templates and supports view and edit restrictions.
Stars: ✭ 12 (-25%)
Mutual labels:  addon
AzeriteUI
Custom user interface suite for WoW. Design and code by Lars Norberg and Daniel Troconis.
Stars: ✭ 0 (-100%)
Mutual labels:  addon
storybook-addon-next
A no config Storybook addon that makes Next.js features just work in Storybook
Stars: ✭ 184 (+1050%)
Mutual labels:  addon
addon-log-viewer
Log Viewer - Home Assistant Community Add-ons
Stars: ✭ 37 (+131.25%)
Mutual labels:  addon
service.subloader
Kodi automatic subtitles
Stars: ✭ 26 (+62.5%)
Mutual labels:  addon
3D2D-Textscreens
3D2D Textscreens Garry's Mod Workshop Addon
Stars: ✭ 26 (+62.5%)
Mutual labels:  addon
Godot-Material-Icons
Templarian's Material Design Icons for Godot
Stars: ✭ 19 (+18.75%)
Mutual labels:  addon
storybook-addon-mock
This addon allows you to mock fetch or XMLHttpRequest in the storybook.
Stars: ✭ 67 (+318.75%)
Mutual labels:  addon
ExoticGarden
A Slimefun 4 Addon that adds new plants and various new food items
Stars: ✭ 50 (+212.5%)
Mutual labels:  addon
djangocms-snippet
django CMS Snippet provides a plugin for django CMS to inject HTML, CSS or JavaScript snippets into your website.
Stars: ✭ 42 (+162.5%)
Mutual labels:  addon
MustardTools
A set of tools for animators/riggers
Stars: ✭ 30 (+87.5%)
Mutual labels:  addon

Compilation Unit Addon

Compilation Units is a technique used to speed up compilation of huge projects, by regrouping compilation unit files (basically the .cpp and .c files) into a few big ones. Basically, instead of compiling foo.cpp and bar.cpp you compile a single foobaz.cpp one which contains the following :

#include "foo.cpp"
#include "bar.cpp"

This technique is based on the one known as Single Compilation Unit, but it allows creating N big compilation units, where N usually is the number of cores of your CPU. This allows you to take advantage of parallel compilation, while retaining the huge speed up introduced by the SCU technique.

How to use

Clone this repository some place where Premake will be able to locate. Then in your project's Premake script, include the main file like this :

require( "premake-compilationunit/compilationunit.lua" )

Then in the projects where you want to enable support for compilation units :

compilationunitenabled ( true )

The final step is to invoke Premake using the compilationunit option:

premake5 --compilationunit=8 <action>

Here I tell the module to use 8 compilation unit files, for projects where it has been enabled.

API

Most of the API commands of this addon are scoped to the current configuration, so unless specified otherwise, assume that the documented command only applies to the current configuration block.

compilationunitenabled boolean

Enable or disable the compilation unit generation for the current filter. By default it's disabled.

compilationunitsonly boolean

If this option is set to true then the generated projects will not include the original files. By defaut this option is false to allow easily editing / browsing the original code in IDEs, but it can be set to true in case you don't need that (think automated build systems, etc.)

compilationunitdir "path"

The path where the compilation unit files will be generated. If not specified, the obj dir will be used. This is a per-project configuration. The addon takes care of handling the various configurations for you.

compilationunitextensions table

By default the extension of the generated compilation units is .c for C files, and .cpp for C++ files. You can use a table to override these extensions. For instance, if you want to enable compilation units on an Objective-C project:

filter {}
    compilationunitextensions {
        "C" = ".m",
        "C++" = ".mm"
    }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].