couldn't build as unity build

Bug #1882792 reported by tom on 2020-06-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
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

tom (brikler) wrote :
tom (brikler) wrote :
tom (brikler) wrote :
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) on 2020-06-09
description: updated
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.

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers