[libcxx-commits] [libcxx] d209d13 - [libcxx] [cmake] Fix cmake_path(ABSOLUTE_PATH) for empty CMAKE_INSTALL_PREFIX
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 20 08:50:30 PDT 2024
Author: Martin Storsjö
Date: 2024-03-20T17:50:12+02:00
New Revision: d209d1340b99d4fbd325dffb5e13b757ab8264ea
URL: https://github.com/llvm/llvm-project/commit/d209d1340b99d4fbd325dffb5e13b757ab8264ea
DIFF: https://github.com/llvm/llvm-project/commit/d209d1340b99d4fbd325dffb5e13b757ab8264ea.diff
LOG: [libcxx] [cmake] Fix cmake_path(ABSOLUTE_PATH) for empty CMAKE_INSTALL_PREFIX
This should hopefully fix the issue brought up at
https://github.com/llvm/llvm-project/pull/85756#issuecomment-2009852291.
Added:
Modified:
libcxx/modules/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/modules/CMakeLists.txt b/libcxx/modules/CMakeLists.txt
index 8dd1b51aac2f72..6c917200d6f318 100644
--- a/libcxx/modules/CMakeLists.txt
+++ b/libcxx/modules/CMakeLists.txt
@@ -207,10 +207,10 @@ add_custom_target(generate-cxx-modules
# Use the relative path between the installation and the module in the json
# file. This allows moving the entire installation to a
diff erent location.
cmake_path(ABSOLUTE_PATH LIBCXX_INSTALL_LIBRARY_DIR
- BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
OUTPUT_VARIABLE ABS_LIBRARY_DIR)
cmake_path(ABSOLUTE_PATH LIBCXX_INSTALL_MODULES_DIR
- BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
OUTPUT_VARIABLE ABS_MODULES_DIR)
file(RELATIVE_PATH LIBCXX_MODULE_RELATIVE_PATH
${ABS_LIBRARY_DIR}
More information about the libcxx-commits
mailing list