Эх сурвалжийг харах

build: differentiate between building for and on Windows

This is necessary to support cross-compiling a Windows libc++ from
Linux.  The CMAKE_SYSTEM_HOST_NAME tells you what, in autotools
parlance, is known as the build as opposed to WIN32 which maps to, in
autotools parlance, host.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290800 91177308-0d34-0410-b5e6-96231b3b80d8
Saleem Abdulrasool 8 жил өмнө
parent
commit
63de5d2a7f

+ 1 - 1
include/CMakeLists.txt

@@ -29,7 +29,7 @@ if (LIBCXX_INSTALL_HEADERS)
 
   if (LIBCXX_NEEDS_SITE_CONFIG)
     set(UNIX_CAT cat)
-    if (WIN32)
+    if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
       set(UNIX_CAT type)
     endif()
     # Generate and install a custom __config header. The new header is created