[libcxx] r290800 - build: differentiate between building for and on Windows

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 1 12:20:36 PST 2017


Author: compnerd
Date: Sun Jan  1 14:20:36 2017
New Revision: 290800

URL: http://llvm.org/viewvc/llvm-project?rev=290800&view=rev
Log:
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.

Modified:
    libcxx/trunk/include/CMakeLists.txt

Modified: libcxx/trunk/include/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/CMakeLists.txt?rev=290800&r1=290799&r2=290800&view=diff
==============================================================================
--- libcxx/trunk/include/CMakeLists.txt (original)
+++ libcxx/trunk/include/CMakeLists.txt Sun Jan  1 14:20:36 2017
@@ -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




More information about the cfe-commits mailing list