Closed jmark closed 7 months ago
@sandro-elsweijer @svengoldberg Feel free to comment if you see room for improvement.
Thanks; well spotted. @scivision, would you think this works given other hierarchical projects?
I would use
if(NOT TARGET SC::SC)
as both targets have the same scope. The "SC::SC" is a bit easier to grok when finding where something came from.
I would use
if(NOT TARGET SC::SC)
as both targets have the same scope. The "SC::SC" is a bit easier to grok when finding where something came from.
@scivision I applied your suggestion. Thanks for the advice!
Thanks so much @jmark and @scivision!
Check if libsc is already a known target.
Proposed changes:
This PR adds a check if libsc is already a known target in the CMake build system. If this is the case, registering libsc is skipped.
This is useful for cases when p4est is included as dependency by other software projects, e.g. t8code, which in turn also depends on libsc. If this check would not be there CMake registers libsc twice which causes conflicts.