OSDN Git Service

[CMake] Handle 'libtool' being at a path with spaces in it.
authorJordan Rose <jordan_rose@apple.com>
Wed, 13 Jun 2018 18:21:47 +0000 (18:21 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 13 Jun 2018 18:21:47 +0000 (18:21 +0000)
This can happen on macOS if the user's Xcode is at a path with spaces in it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334632 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt

index a208587..ba0a467 100644 (file)
@@ -92,7 +92,7 @@ if(CMAKE_HOST_APPLE AND APPLE)
 
     foreach(lang ${languages})
       set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
-        "${CMAKE_LIBTOOL} -static ${LIBTOOL_NO_WARNING_FLAG} -o <TARGET> \
+        "\"${CMAKE_LIBTOOL}\" -static ${LIBTOOL_NO_WARNING_FLAG} -o <TARGET> \
         <LINK_FLAGS> <OBJECTS> ")
     endforeach()
   endif()