llvm.org GIT mirror llvm / 18fcbf5
[cmake] Only attempt to install MSVC system libraries on Windows Newer versions of CMake (I'm on 3.10, but I believe 3.9 behaves the same way) attempt to query the system for information about the VS 2017 install. Unfortunately, this query fails on non-Windows systems: cmake_host_system_information does not recognize <key> VS_15_DIR CMake isn't going to find these system libraries on non-Windows anyway (and we were previously silencing the resultant warnings in our cross-compilation toolchain), so it makes sense to just omit the attempted installation entirely on non-Windows. Differential Revision: https://reviews.llvm.org/D41220 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320724 91177308-0d34-0410-b5e6-96231b3b80d8 Shoaib Meenai 1 year, 10 months ago
2 changed file(s) with 1 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
10091009 endif()
10101010
10111011 # This allows us to deploy the Universal CRT DLLs by passing -DCMAKE_INSTALL_UCRT_LIBRARIES=ON to CMake
1012 if (MSVC)
1012 if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
10131013 include(InstallRequiredSystemLibraries)
10141014 endif()
10151015
298298 # control which libraries they require.
299299 set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
300300 set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
301
302 # CMake's InstallRequiredSystemLibraries module searches for a Visual Studio
303 # installation in order to determine where to copy the required DLLs. This
304 # installation won't exist when cross-compiling, of course, so silence the
305 # resulting warnings about missing libraries.
306 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
307