MarkSchofield / WindowsToolchain

A repository containing a CMake toolchain for using MSVC
MIT License
106 stars 19 forks source link

Add a Windows.EWDK.toolchain.cmake #77

Closed MarkSchofield closed 1 year ago

MarkSchofield commented 1 year ago

As @kaloth called out in #74, using WindowsToolchain from an Enterprise WDK environment is a bit tricky. That review - I think - got the minimal fixes in to make it possible, this is a rough PR to get a better solution in place. There's work still to do:

Feedback on the code and above points is welcomed!


This PR adds the "Windows.EWDK.toolchain.cmake" file to make CMake builds with the EWDK easier - converting EWDK-initialized environment variables to CMake properties to then use "Windows.MSVC.toolchain.cmake"

kaloth commented 1 year ago

This is looking good. I'll have a go at using it and report back.

MarkSchofield commented 1 year ago

Well, it looks like this can't be validated by a GitHub action - the 'About GitHub-hosted runners' page calls out that the runners only have 14GB of SSD space, which is too small to download the EWDK iso to. Due diligence validation on this toolchain looks like it would have to be manual. Perhaps it could be scripted for semi-automated local validation...? I feel a little bad to have folks pull 16GB iso's down.

kaloth commented 1 year ago

I've checked the change locally and it's working nicely on my system (Win10 running on QEMU KVM).

It's a pain that we can't validate it on GitHub, especially as their existing images already have VS installed. Maybe they'd be open to making a new base image without VS that then gives us enough space for the EWDK? Probably a long shot.

kaloth commented 1 year ago

BTW, I like having this as an additional toolchain file. It makes it nicely explicit and opt-in without the chance of someone accidentally using parts of it when they didn't mean to.

MarkSchofield commented 1 year ago

BTW, I like having this as an additional toolchain file. It makes it nicely explicit and opt-in without the chance of someone accidentally using parts of it when they didn't mean to.

Yeah, I think it encapsulates things well, and makes it really clear which environment variables are being used. Thanks for trying it out.