kossebau added a comment.
Yes, `#pragma once` might be the nicer solution here. I stayed away from proposing it though, as for one it is not a real standard by specifications and also by KDE coding traditions. And I would not like to be the one adding (and thus being responsible) the guinea pig to find out if that pragma is good enough for the real world ;) Given the generated file is build-specific, one could write a configure test to check if the compiler supports it and then use that. Left for the next person though, the patch as-is solves the issues I hit already ;) REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D5866 To: kossebau, #frameworks, #build_system Cc: elvisangelaccio