Following a mail on breaked jenkins builds, I took a look on the kajongg one.
The issue is due to the fact that there are spaces in the source folder: "/home/jenkins/workspace/Applications/kajongg/kf5-qt5 SUSEQt5.12" and cmake does not like spaces for rule names.
Details
Clone the source in a folder with a space in it. Compile before the change and see it does not work.
Compile after the change and see it compiles fine.
Diff Detail
- Repository
- R387 Kajongg
- Lint
Lint Skipped - Unit
Unit Tests Skipped
This one should also fix https://bugs.kde.org/show_bug.cgi?id=376303
No need to have a full path one the rule name, it's not used elsewhere.
It might be a good idea to harden this fix further:
- The file name could potentially have spaces in it. So, a simple (string(REPLACE ...)) for spaces with underscores should fix that (see D23233).
- Instead of using the full path, we could use the path relative to the current source directory (file(RELATIVE_PATH ...)) to get a unique target name. Another option would be to check (if(TARGET ...)) and add a numeric suffix as needed. Both would handle the case where the project has the same filename in two different paths. This will still fix bug 376303 by creating shorter target names.
Replace spaces by underscores
Use relative filename instead of just filename to avoid duplicates target name rules
It's pushed on master and works fine: https://build.kde.org/job/Applications/job/kajongg/
Should I cherry-pick it to stable branch?
I can't close the revision too (maybe missing an approval?)
No, the reason is different: the format of the commit message does not contain the expected line at the end. See how the other commit messages produced by arc(anist) are formatted.
Thanks for landing this. If we could get this deployed to the stable branch as well (given it's a build fix) that would be fantastic.