Adjust boost related files to enable cross compiling#6217
Adjust boost related files to enable cross compiling#6217sgr-ms wants to merge 4 commits intomicrosoft:masterfrom
Conversation
…oost-uuid and its dependencies
ports/boost-build/portfile.cmake
Outdated
| if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") | ||
| return() | ||
| elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
| elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Windows") |
There was a problem hiding this comment.
empty VCPKG_CMAKE_SYSTEM_NAME means Windows triplet and WindowsStore means uwp triplet. I don't see any triplet that sets it to "Windows".
There was a problem hiding this comment.
I guess I was basing this off of CMAKE_SYSTEM_NAME which should default to CMAKE_HOST_SYSTEM_NAME. Should I just leave it as
elseif(CMAKE_HOST_WIN32) ?
There was a problem hiding this comment.
I think that would give you the behavior you are looking for.
There was a problem hiding this comment.
Why is noop the boost-build port in these situations?
There was a problem hiding this comment.
Because AFAIK we don't build the build system for boost for the target platform but only for the host, so if we're building on Windows even if we cross compile for store we still use the x86 boost build version (I hope I'm remember @ras0219-msft 's explanation correctly :) ).
And I think that removing this check won't work, because what I want to achieve is built the tools only if I'm trying to build them for the host platform (so I'm testing whether it's not Windows to detect cross compilation on Windows for e.g. store or Android x86), what do you think?
|
@sgr-ms, thanks for the PR, it seems that supports cross compilling currently, we're closing this for now, feel free to reopen this PR if I'm wrong here. |
Specifically boost-uuid and its dependencies. This enabled cross compilation for iOS and Android