From 61bce47e3b5b526f7b28eccc840ec72a649a70b8 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 1 Jan 2017 20:20:36 +0000 Subject: [PATCH] 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. llvm-svn: 290800 --- libcxx/include/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index b1d6acb2b1ff..7b574353193d 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/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