This is an archive of the discontinued LLVM Phabricator instance.

Use GNUInstallDirs to define install locations for documentation
Needs ReviewPublic

Authored by t-tye on Jul 19 2021, 8:12 PM.

Details

Reviewers
scott.linder
Summary

Use CMake's GNUInstallDirs include file to define the install
CMAKE_INSTALL_DATADIR and CMAKE_INSTALL_MANDIR. (Was unable to use
CMAKE_INSTALL_DOCDIR as the CMake files define the PROJECT_NAME as LLVM for
all projects.)

Diff Detail

Event Timeline

t-tye created this revision.Jul 19 2021, 8:12 PM
t-tye requested review of this revision.Jul 19 2021, 8:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2021, 8:12 PM

I think the change itself LGTM, but I did a grep for GNUInstallDirs and it it only used in two other places currently. I suppose that means it is OK to use, but it does seem to imply there can be cases where we install to inconsistent locations. I don't know who to add to get more info on this, though?

t-tye added a comment.Jul 26 2021, 4:10 PM

I think the change itself LGTM, but I did a grep for GNUInstallDirs and it it only used in two other places currently. I suppose that means it is OK to use, but it does seem to imply there can be cases where we install to inconsistent locations. I don't know who to add to get more info on this, though?

Right. I did check and saw GNUInstallDirs was being used elsewhere in relation to the documentation installing. So making this change seemed consistent. I think all documentation installing is now using GNUInstallDirs, but I did not check how other non-documentation install rules are being done. I would be happy to update this review if someone can advise.