[PATCH] D41220: [cmake] Only attempt to install MSVC system libraries on Windows

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 10:42:30 PST 2017


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL320724: [cmake] Only attempt to install MSVC system libraries on Windows (authored by smeenai, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41220?vs=126888&id=126992#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41220

Files:
  llvm/trunk/CMakeLists.txt
  llvm/trunk/cmake/platforms/WinMsvc.cmake


Index: llvm/trunk/cmake/platforms/WinMsvc.cmake
===================================================================
--- llvm/trunk/cmake/platforms/WinMsvc.cmake
+++ llvm/trunk/cmake/platforms/WinMsvc.cmake
@@ -299,10 +299,3 @@
 # control which libraries they require.
 set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
 set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
-
-# CMake's InstallRequiredSystemLibraries module searches for a Visual Studio
-# installation in order to determine where to copy the required DLLs. This
-# installation won't exist when cross-compiling, of course, so silence the
-# resulting warnings about missing libraries.
-set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
-
Index: llvm/trunk/CMakeLists.txt
===================================================================
--- llvm/trunk/CMakeLists.txt
+++ llvm/trunk/CMakeLists.txt
@@ -1010,7 +1010,7 @@
 endif()
 
 # This allows us to deploy the Universal CRT DLLs by passing -DCMAKE_INSTALL_UCRT_LIBRARIES=ON to CMake
-if (MSVC)
+if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
   include(InstallRequiredSystemLibraries)
 endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41220.126992.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171214/cb435f6b/attachment.bin>


More information about the llvm-commits mailing list