[PATCH] D48356: [libcxx] [CMake] Convert paths to the right form in standalone builds on Windows
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 20 12:31:56 PDT 2018
smeenai accepted this revision.
smeenai added a comment.
This revision is now accepted and ready to land.
Looks good with the quotes added.
================
Comment at: cmake/Modules/HandleCompilerRT.cmake:17
string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
+ file(TO_CMAKE_PATH ${LIBRARY_FILE} LIBRARY_FILE)
string(REPLACE "builtins" "${name}" LIBRARY_FILE "${LIBRARY_FILE}")
----------------
Nit: cmake recommends always putting quotes around the path argument to ensure it's treated as a single argument, i.e.
file(TO_CMAKE_PATH "${LIBRARY_FILE}" LIBRARY_FILE)
That needs to happen in all other uses as well.
================
Comment at: cmake/Modules/HandleOutOfTreeLLVM.cmake:52
else()
- set(LLVM_CMAKE_PATH
- "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+ file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE)
+ set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
----------------
Is there ever a chance LLVM_BINARY_DIR will have backslashes, or are you just being extra careful (or going for consistency)?
Repository:
rCXX libc++
https://reviews.llvm.org/D48356
More information about the cfe-commits
mailing list