[llvm] 89f77be - [llvm] [cmake] Silence GNUInstallDirs warning in LLVMInstallSymlink

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 23:49:39 PDT 2022


Author: Michał Górny
Date: 2022-10-28T08:49:26+02:00
New Revision: 89f77be94ff8bcbe3691e7b9a82faee59bd29f11

URL: https://github.com/llvm/llvm-project/commit/89f77be94ff8bcbe3691e7b9a82faee59bd29f11
DIFF: https://github.com/llvm/llvm-project/commit/89f77be94ff8bcbe3691e7b9a82faee59bd29f11.diff

LOG: [llvm] [cmake] Silence GNUInstallDirs warning in LLVMInstallSymlink

Set a dummy CMAKE_INSTALL_LIBDIR in order to silence the following CMake
warning when executing LLVMInstallSymlink.cmake script:

    CMake Warning (dev) at /usr/share/cmake/Modules/GNUInstallDirs.cmake:243 (message):
      Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
      target architecture is known.  Please enable at least one language before
      including GNUInstallDirs.
    Call Stack (most recent call first):
      /usr/lib/llvm/16/lib64/cmake/llvm/LLVMInstallSymlink.cmake:5 (include)
      tools/lld/cmake_install.cmake:66 (include)
      cmake_install.cmake:52 (include)

Differential Revision: https://reviews.llvm.org/D136573

Added: 
    

Modified: 
    llvm/cmake/modules/LLVMInstallSymlink.cmake

Removed: 
    


################################################################################
diff  --git a/llvm/cmake/modules/LLVMInstallSymlink.cmake b/llvm/cmake/modules/LLVMInstallSymlink.cmake
index e9be04aceb3d3..274cef64b3e79 100644
--- a/llvm/cmake/modules/LLVMInstallSymlink.cmake
+++ b/llvm/cmake/modules/LLVMInstallSymlink.cmake
@@ -2,6 +2,9 @@
 # DESTDIR environment variable may be unset at configuration time.
 # See PR8397.
 
+# Set to an arbitrary directory to silence GNUInstallDirs warnings
+# regarding being unable to determine libdir.
+set(CMAKE_INSTALL_LIBDIR "lib")
 include(GNUInstallDirs)
 
 function(install_symlink name target outdir)


        


More information about the llvm-commits mailing list