diff options
author | Petr Hosek <phosek@chromium.org> | 2017-07-11 02:39:50 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-07-11 02:39:50 +0000 |
commit | 347be61138344a566133e99b4514b1da16a81c87 (patch) | |
tree | deff48ba89fdc40b9a2b27087712bc275c353fbd /CMakeLists.txt | |
parent | 880dc47f3718c9a2e913a87676f351547760b3a1 (diff) |
[libcxx][CMake] Add install path variable to allow overriding the destination
This is going to be used by the runtime build in the multi-target
setup to allow using different install prefix for each target.
Differential Revision: https://reviews.llvm.org/D33762
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b5971036..1f8b24d17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -352,6 +352,13 @@ else() endif() file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}") +set(LIBCXX_INSTALL_PREFIX "" CACHE STRING + "Define libc++ destination prefix.") + +if (NOT LIBCXX_INSTALL_PREFIX MATCHES "^$|.*/") + message(FATAL_ERROR "LIBCXX_INSTALL_PREFIX has to end with \"/\".") +endif() + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) |