[libcxx-commits] [PATCH] D130586: [cmake] Use `CMAKE_INSTALL_LIBDIR` too

John Ericson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 28 15:48:20 PDT 2022


Ericson2314 marked an inline comment as done.
Ericson2314 added inline comments.


================
Comment at: clang/CMakeLists.txt:100
   set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
-  set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+  set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib)
   if(WIN32 OR CYGWIN)
----------------
sebastian-ne wrote:
> Ericson2314 wrote:
> > sebastian-ne wrote:
> > > Just to check if your intention aligns with my understanding, removing the suffix here is fine because the destination is in the binary dir and not the final install destination?
> > Yes exactly.
> > 
> > I really should write up the "rules" that I've (a) discovered from reading (b) invented somewhere. Any idea where?
> I think the commit message is a good place.
Mmm, my philosophy is that commit messages should document relationships between the code, but the code in isolation should be documented in-tree.

I wouldn't want one to have to `git log` to find this information which should be a "living reference" of the current CMake idioms as currently practiced, make sense?


================
Comment at: llvm/CMakeLists.txt:59-60
+if (NOT DEFINED CMAKE_INSTALL_LIBDIR AND DEFINED LLVM_LIBDIR_SUFFIX)
+  message(WARNING "\"LLVM_LIBDIR_SUFFIX\" is deprecated. "
+                  "Please set \"CMAKE_INSTALL_LIBDIR\" directly instead.")
+  set(CMAKE_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
----------------
sebastian-ne wrote:
> There’s also `message(DEPRECATION …)` :)
Oh nice!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130586/new/

https://reviews.llvm.org/D130586



More information about the libcxx-commits mailing list