Comment 0 for bug 1882792

tom (brikler) wrote :

salve,

i am using 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

```
make[1]: *** [CMakeFiles/Makefile2:8084: compizconfig/libcompizconfig/src/CMakeFiles/compizconfig.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /tmp/makepkg/compiz/src/compiz-0.9.14.1/src/outputdevices_x11.cpp:25,
                 from /tmp/makepkg/compiz/src/compiz-0.9.14.1/build/src/CMakeFiles/compiz_outputdevices.dir/Unity/unity_0_cxx.cxx:4:
/tmp/makepkg/compiz/src/compiz-0.9.14.1/src/outputdevices.h:40:7: error: redefinition of 'class compiz::core::OutputDevices'
   40 | class OutputDevices
      | ^~~~~~~~~~~~~
In file included from /tmp/makepkg/compiz/src/compiz-0.9.14.1/src/outputdevices.cpp:26,
                 from /tmp/makepkg/compiz/src/compiz-0.9.14.1/build/src/CMakeFiles/compiz_outputdevices.dir/Unity/unity_0_cxx.cxx:3:
/tmp/makepkg/compiz/src/compiz-0.9.14.1/src/outputdevices.h:40:7: note: previous definition of 'class compiz::core::OutputDevices'
   40 | class OutputDevices
      | ^~~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/compiz_outputdevices.dir/build.make:83: src/CMakeFiles/compiz_outputdevices.dir/Unity/unity_0_cxx.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:7514: src/CMakeFiles/compiz_outputdevices.dir/all] Error 2
[ 68%] Linking CXX static library libresize_logic.a
[ 68%] Built target resize_logic
make: *** [Makefile:183: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> Removing installed dependencies...
```