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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits