[clang] ddcc02d - Quote some more destination paths with variables
John Ericson via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 13 09:29:16 PST 2021
Author: John Ericson
Date: 2021-12-13T17:29:08Z
New Revision: ddcc02dbcc4767b289776f73f26fe444964d0942
URL: https://github.com/llvm/llvm-project/commit/ddcc02dbcc4767b289776f73f26fe444964d0942
DIFF: https://github.com/llvm/llvm-project/commit/ddcc02dbcc4767b289776f73f26fe444964d0942.diff
LOG: Quote some more destination paths with variables
Just defensive CMake-ing. I pulled this from D115544 and D99484 which
are blocked on some lldb CI failures I don't yet understand. Hoping to land
something smaller in the meantime.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D115566
Added:
Modified:
clang/tools/scan-build/CMakeLists.txt
libclc/CMakeLists.txt
libcxx/include/CMakeLists.txt
lldb/cmake/modules/FindLibEdit.cmake
llvm/cmake/modules/AddSphinxTarget.cmake
openmp/runtime/src/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/scan-build/CMakeLists.txt b/clang/tools/scan-build/CMakeLists.txt
index ec0702d76f184..74334e53c9b18 100644
--- a/clang/tools/scan-build/CMakeLists.txt
+++ b/clang/tools/scan-build/CMakeLists.txt
@@ -66,16 +66,16 @@ if(CLANG_INSTALL_SCANBUILD)
endforeach()
foreach(ManPage ${ManPages})
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage}
+ add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage}"
COMMAND ${CMAKE_COMMAND} -E make_directory
- ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1
+ "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1"
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage}
- ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/
+ "${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage}"
+ "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/"
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage})
- list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage})
+ list(APPEND Depends "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage}")
install(PROGRAMS man/${ManPage}
- DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
+ DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
COMPONENT scan-build)
endforeach()
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index ec39ea63f2d02..e90e0fd852012 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -183,8 +183,8 @@ endif()
# pkg-config file
configure_file( libclc.pc.in libclc.pc @ONLY )
-install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig )
-install( DIRECTORY generic/include/clc DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig" )
+install( DIRECTORY generic/include/clc DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" )
if( ENABLE_RUNTIME_SUBNORMAL )
add_library( subnormal_use_default STATIC
@@ -192,7 +192,7 @@ if( ENABLE_RUNTIME_SUBNORMAL )
add_library( subnormal_disable STATIC
generic/lib/subnormal_disable.ll )
install( TARGETS subnormal_use_default subnormal_disable ARCHIVE
- DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
endif()
find_package( Python3 REQUIRED COMPONENTS Interpreter )
@@ -343,7 +343,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
add_custom_target( "prepare-${spv_suffix}" ALL
DEPENDS "${spv_suffix}" )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${spv_suffix}
- DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
else()
# Add prepare target
@@ -366,7 +366,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
PROPERTIES ENVIRONMENT "LLVM_CONFIG=${LLVM_CONFIG}" )
endif()
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
foreach( a ${${d}_aliases} )
set( alias_suffix "${a}-${t}.bc" )
add_custom_target( ${alias_suffix} ALL
@@ -374,7 +374,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
create_symlink ${obj_suffix}
${alias_suffix}
DEPENDS "prepare-${obj_suffix}" )
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${alias_suffix} DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${alias_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
endforeach( a )
endif()
endforeach( d )
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 17f760c3a2891..15844d0cc962a 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -531,7 +531,7 @@ if (LIBCXX_INSTALL_HEADERS)
foreach(file ${files})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file}
- DESTINATION ${LIBCXX_INSTALL_INCLUDE_DIR}/${dir}
+ DESTINATION "${LIBCXX_INSTALL_INCLUDE_DIR}/${dir}"
COMPONENT cxx-headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
@@ -539,7 +539,7 @@ if (LIBCXX_INSTALL_HEADERS)
# Install the generated __config_site.
install(FILES ${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site
- DESTINATION ${LIBCXX_INSTALL_INCLUDE_TARGET_DIR}
+ DESTINATION "${LIBCXX_INSTALL_INCLUDE_TARGET_DIR}"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
COMPONENT cxx-headers)
diff --git a/lldb/cmake/modules/FindLibEdit.cmake b/lldb/cmake/modules/FindLibEdit.cmake
index b4f0cb3298114..8b00d34de001a 100644
--- a/lldb/cmake/modules/FindLibEdit.cmake
+++ b/lldb/cmake/modules/FindLibEdit.cmake
@@ -25,14 +25,14 @@ else()
HINTS
${PC_LIBEDIT_INCLUDEDIR}
${PC_LIBEDIT_INCLUDE_DIRS}
- ${CMAKE_INSTALL_FULL_INCLUDEDIR})
+ "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
find_library(LibEdit_LIBRARIES
NAMES
edit libedit
HINTS
${PC_LIBEDIT_LIBDIR}
${PC_LIBEDIT_LIBRARY_DIRS}
- ${CMAKE_INSTALL_FULL_LIBDIR})
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
if(LibEdit_INCLUDE_DIRS AND EXISTS "${LibEdit_INCLUDE_DIRS}/histedit.h")
file(STRINGS "${LibEdit_INCLUDE_DIRS}/histedit.h"
diff --git a/llvm/cmake/modules/AddSphinxTarget.cmake b/llvm/cmake/modules/AddSphinxTarget.cmake
index e80c3b5c1cac9..d14095d3aa74d 100644
--- a/llvm/cmake/modules/AddSphinxTarget.cmake
+++ b/llvm/cmake/modules/AddSphinxTarget.cmake
@@ -74,7 +74,7 @@ function (add_sphinx_target builder project)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
if (builder STREQUAL man)
if (CMAKE_INSTALL_MANDIR)
- set(INSTALL_MANDIR ${CMAKE_INSTALL_MANDIR}/)
+ set(INSTALL_MANDIR "${CMAKE_INSTALL_MANDIR}/")
else()
set(INSTALL_MANDIR share/man/)
endif()
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index 60f97bd3d2ae3..e4f4e6e1e73ff 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -358,9 +358,9 @@ if(WIN32)
set(LIBOMP_ALIASES "libiomp5md")
foreach(alias IN LISTS LIBOMP_ALIASES)
install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy \"${LIBOMP_LIB_FILE}\"
- \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX}/bin)")
+ \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/bin\")")
install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy \"${LIBOMP_IMP_LIB_FILE}\"
- \"${alias}${CMAKE_STATIC_LIBRARY_SUFFIX}\" WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX}/${OPENMP_INSTALL_LIBDIR})")
+ \"${alias}${CMAKE_STATIC_LIBRARY_SUFFIX}\" WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${OPENMP_INSTALL_LIBDIR}\")")
endforeach()
else()
@@ -372,7 +372,7 @@ else()
foreach(alias IN LISTS LIBOMP_ALIASES)
install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
\"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY
- \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${OPENMP_INSTALL_LIBDIR})")
+ \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${OPENMP_INSTALL_LIBDIR}\")")
endforeach()
endif()
endif()
More information about the cfe-commits
mailing list