This is an archive of the discontinued LLVM Phabricator instance.

Simplify AddSphinxTarget.cmake by just including `GNUInstallDirs`
ClosedPublic

Authored by Ericson2314 on Dec 12 2021, 9:14 AM.

Details

Summary

See the discussion in D30906 for how it must be robust to downstream
projects that might not use GNUInstallDirs.

I think an easier approach is just to include GNUInstallDirs so that
we can always rely on it. Looking at its definition in
https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/GNUInstallDirs.cmake
it appears safe to include multiple times.

I am trying this out because we will face the same problem many times
over if we use GNUInstallDirs more widely, as proposed in D99484 and
its parent revisions, since we do not know what downstream projects do
and rather not break them.

Diff Detail

Event Timeline

Ericson2314 created this revision.Dec 12 2021, 9:14 AM
Ericson2314 requested review of this revision.Dec 12 2021, 9:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2021, 9:14 AM
phosek accepted this revision.Dec 13 2021, 2:11 AM

LGTM

This revision is now accepted and ready to land.Dec 13 2021, 2:11 AM

Rebase after conflict

This revision was landed with ongoing or failed builds.Dec 13 2021, 1:27 PM
This revision was automatically updated to reflect the committed changes.