[libcxx-commits] [PATCH] D117639: [cmake] Avoid warning or extra suffix for CMAKE_INSTALL_LIBDIR
John Ericson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 19 09:05:02 PST 2022
Ericson2314 added a comment.
In D117639#3254065 <https://reviews.llvm.org/D117639#3254065>, @arichardson wrote:
> I believe `LLVM_LIBDIR_SUFFIX` was added as a workaround for not being able to use GNUInstallDirs (which will automatically detect the right suffixed e.g. for SuSE) in rG46fed3b475ddd92d02d9b72d0d77c5a939f132d1 <https://reviews.llvm.org/rG46fed3b475ddd92d02d9b72d0d77c5a939f132d1>. Would it be possible to move the include() below the `project()/enable_language()` calls so that CMake can detect the expected libdir suffix and then use something like the following:
>
> # If LLVM_LIBDIR_SUFFIX is defined, we use that to override the libdir, otherwise GNUInstallDirs defaults should be correct.
> if(DEFINED LLVM_LIBDIR_SUFFIX)
> message(DEPRECATION "LLVM_LIBDIR_SUFFIX is deprecated, set CMAKE_INSTALL_LIBDIR to lib${LLVM_LIBDIR_SUFFIX} instead")
> set(CMAKE_INSTALL_LIBDIR lib${LLVM_LIBDIR_SUFFIX})
> endif()
> include(GNUInstallDirs)
I would love to do this, but I was unsure whether that was acceptable.
It gets even more complicated downstream when other `*_LIBDIR_SUFFIX` variable are defaulted from `LLVM_LIBDIR_SUFFIX`. Can we deprecate that too?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117639/new/
https://reviews.llvm.org/D117639
More information about the libcxx-commits
mailing list