[PATCH] D132608: [CMake] Clean up CMake binary dir handling

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 14 14:03:13 PDT 2022


ldionne added inline comments.


================
Comment at: libcxx/CMakeLists.txt:421
+if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+  set(default_install_path "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
+else()
----------------
ldionne wrote:
> Instead, I'd do this:
> 
> ```
> if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
>   set(_include_target_dir "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
>   set(_install_library_dir "lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}")
> else()
>   set(_include_target_dir "${LIBCXX_INSTALL_INCLUDE_DIR}")
>   set(_install_library_dir "lib${LLVM_LIBDIR_SUFFIX}")
> endif()
> 
> set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${_include_target_dir}" CACHE PATH
>     "Path where target-specific libc++ headers should be installed.")
> set(LIBCXX_INSTALL_LIBRARY_DIR "${_install_library_dir}" CACHE PATH
>     "Path where built libc++ libraries should be installed.")
> ```
> 
> IMO that's easier on the eye.
Gentle ping on this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132608



More information about the cfe-commits mailing list