[libcxx-commits] [PATCH] D117418: [pstl][cmake] Use `GNUInstallDirs` to support custom installation dirs.
John Ericson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jan 15 22:07:56 PST 2022
Ericson2314 created this revision.
Ericson2314 added reviewers: compnerd, phosek, beanz.
Herald added a subscriber: mgorny.
Herald added a reviewer: ldionne.
Ericson2314 requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
I am breaking apart D99484 <https://reviews.llvm.org/D99484> so the cause of build failures is easier to
understand.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117418
Files:
pstl/CMakeLists.txt
Index: pstl/CMakeLists.txt
===================================================================
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -7,6 +7,8 @@
#===----------------------------------------------------------------------===##
cmake_minimum_required(VERSION 3.13.4)
+include(GNUInstallDirs)
+
set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
string(REGEX REPLACE "#define _PSTL_VERSION (.*)$" "\\1" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}")
@@ -90,10 +92,10 @@
"${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfigVersion.cmake"
DESTINATION lib/cmake/ParallelSTL)
install(DIRECTORY include/
- DESTINATION include
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
PATTERN "*.in" EXCLUDE)
install(FILES "${PSTL_CONFIG_SITE_PATH}"
- DESTINATION include)
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
add_custom_target(install-pstl
COMMAND "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake_install.cmake" -DCOMPONENT=ParallelSTL)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117418.400344.patch
Type: text/x-patch
Size: 1187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220116/7e2e36fd/attachment.bin>
More information about the libcxx-commits
mailing list