<table><tr><td style="">kossebau created this revision.<br />Restricted Application added projects: Frameworks, Build System.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5866" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The old guard was created just from the identifier + _H, which runs the<br />
chance to clash in projects which use an identifier matching the project<br />
name and which also have a class or central file header which is named<br />
by the project and then has an include guard matching the filename.<br />
Example:<br />
project ABC -> abc.h with ABC_H guard<br />
identifier ABC, header debug.h -> debug.h with ABC_H guard<br />
any.cpp including both abc.h and debug.h will see only one content</p>

<p>Using both the header file name and identifier for the guard name<br />
and prefixing it additionally with a macro specific term should make<br />
the guard both follow the usual pattern for guards matching the<br />
file name and also add some namespacing to allow for similar named<br />
header files in bigger projects (e.g. "debug.h") which could be<br />
included in the same include tree.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R240 Extra CMake Modules</div></div></div><br /><div><strong>BRANCH</strong><div><div>improveqtlogdeclareheaderguard</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5866" rel="noreferrer">https://phabricator.kde.org/D5866</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>modules/ECMQtDeclareLoggingCategory.cmake</div></div></div><br /><div><strong>To: </strong>kossebau, Frameworks, Build System<br /></div>