On 6. 6. 25 21:14, Branko Čibej wrote:
On 6. 6. 25 17:50, Timofei Zhakov wrote:

But the thing is in the workflow, there is nothing can tell cmake to switch
the platform to x86 (cmake defaults the Visual Studio generator to x64
platform). Meaning that x64 compiler tries to link it against x86
libraries.

The simplest way to fix the problem is to pass this extra argument:
`-DCMAKE_GENERATOR_PLATFORM=Win32` to cmake, so it could use the
proper platform.

We'd have to split the current  single YAML into two. Also, this being MSBuild, CMAKE_BUILD_TYPE doesn't actually mean anything to the generator, and we could run both debug and release builds in a single script, saving half of the time spent on fetching dependencies.


I just successfully built and ran tests on Windows, cross-compiled ARM64->x86, using your suggestion to force CMake to use the Win32 platform. So, indeed, that works!

(One test failed, with a different error code than expected; that's a minor issue.)

-- Brane

Reply via email to