[PATCH] D117639: [cmake] Avoid warning or extra suffix for CMAKE_INSTALL_LIBDIR
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 02:44:58 PST 2022
arichardson added a comment.
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)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117639/new/
https://reviews.llvm.org/D117639
More information about the llvm-commits
mailing list