We build some objects several times which makes it uncomfortable to develop KWin
since every time we modify something a lot of things get rebuilt. This should
help a bit although it doesn't solve all the problems.
Details
- Reviewers
zzag - Group Reviewers
KWin - Commits
- R108:dbac4bce7e62: Reduce the amount of objects that are compiled several times
Builds, tests pass
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
CMakeLists.txt | ||
---|---|---|
376 | It should be installed or static. |
utils.cpp | ||
---|---|---|
80–85 | Why were these two moved? |
Do you have stats that show how much time it takes to compile kwin w/ and w/o this change?
The problem isn't build time per se, which also is, but that every time you save a file you'll get changes in few hundred objects.
You can try it easily by modifying cursors.cpp or screens.cpp on a ready build directory and triggering a build. There will be few hundred build steps to be done (on my laptop which isn't that bad it's easily 4 or 5 minutes to wait).
CMakeLists.txt | ||
---|---|---|
376 | Why, no? | |
utils.cpp | ||
80–85 | Because they need to be out of the #ifndef KCMRULES. |
CMakeLists.txt | ||
---|---|---|
376 | I used an object library in a phab review recently and it caused an issue when Marco (on OpenSuSe) tried to compile it even though it worked well for me. So be wary. Though it's equally possible I just did it wrong. We can ship it, CI will complain if it doesn't work :) |