This is an archive of the discontinued LLVM Phabricator instance.

[openmp][cmake] Use `GNUInstallDirs` to support custom installation dirs
ClosedPublic

Authored by Ericson2314 on Jan 21 2022, 11:00 PM.

Details

Summary

I am breaking apart D99484 so the cause of build failures is easier to
understand.

Diff Detail

Event Timeline

Ericson2314 created this revision.Jan 21 2022, 11:00 PM
Ericson2314 requested review of this revision.Jan 21 2022, 11:00 PM
Herald added a project: Restricted Project. · View Herald Transcript

This part, too, checks out. Landing next.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 22 2022, 10:05 AM
This revision was automatically updated to reflect the committed changes.
mstorsjo added inline comments.
openmp/runtime/src/CMakeLists.txt
361

This change seems to have broken one aspect: When doing ninja install I now get a warning saying Error copying file "libomp.dll" to "libiomp5md.dll"., and libiomp5md.dll isn't installed.

I believe the reason is that the inline cmake snippet is written to runtime/src/cmake_install.cmake and then executed on install, but on install, ${CMAKE_INSTALL_BINDIR} isn't set (as GNUInstallDirs isn't included there). Should this maybe expand ${CMAKE_INSTALL_BINDIR} right here instead of deferring it to the install cmake, or what's the right course of action?

Ericson2314 marked an inline comment as done.Jan 28 2022, 10:01 PM
Ericson2314 added inline comments.
openmp/runtime/src/CMakeLists.txt
361

Did in D118528!