couldn't build as unity build

Bug #1882792 reported by tom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Undecided
Unassigned

Bug Description

salve,

i am using archlinux and with cmake to build compiz but it breaks with the cmake switch -DCMAKE_UNIT_BUILD=TRUE.
a very good and short description how does unity build are work: https://mesonbuild.com/Unity-builds.html

as build time example for a successful unity build or jumbo build. i tested this feature with kactivities three times and it reduce the build time greatly!

#with set `-DCMAKE_UNITY_BUILD=true`
real 66,03 - 68,91 - 68,93
user 92,77 - 98,05 - 68,93
sys 8,80 - 8,76 - 8,95```

#without `-DCMAKE_UNITY_BUILD=true`
real 128,53 - 125,27 - 129,16
user 219,17 - 215,70 - 219,40
sys 15,54 - 15,68 - 16,41

unfortunale compiz isn't in the arch repository and i must rebuild every time when something is changed and i don't "speak" c++ so it isn't possible to fix this problem :(

Related branches

Revision history for this message
tom (brikler) wrote :
Revision history for this message
tom (brikler) wrote :
Revision history for this message
tom (brikler) wrote :
Revision history for this message
tom (brikler) wrote :

as build time example for a successful unity build or jumbo build. i tested this feature with kactivities three times and it reduce the build time greatly!

#with set `-DCMAKE_UNITY_BUILD=true`
real 66,03 - 68,91 - 68,93
user 92,77 - 98,05 - 68,93
sys 8,80 - 8,76 - 8,95```

#without `-DCMAKE_UNITY_BUILD=true`
real 128,53 - 125,27 - 129,16
user 219,17 - 215,70 - 219,40
sys 15,54 - 15,68 - 16,41

tags: added: jumbo-build unity-build
removed: unitybuild
tom (brikler)
description: updated
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Basically every header file needs to include this boilerplate:

#ifndef _FOO_H
#define _FOO_H
...
#endif

Many files already have this, but also many don't. This command prints a list of them:

find -name "*.h" -exec grep -L "ifndef .*_H" {} +

Maybe at some day I will have time to fix them, but in the mean time merge proposals are welcome.

Revision history for this message
tom (brikler) wrote :

@mitya57
it isn't urgent to fix this and without unity it builds but as unity build compiles much faster,
so i suggest try a unity build

the header were included with the source files
https://bugs.launchpad.net/compiz/+bug/1882792/+attachment/5382043/+files/unity_0_cxx.cxx

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

I have released version 0.9.14.2 today, which includes this fix.

Changed in compiz:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.