Skip to content

Fixes to 'Windows.EWDK.toolchain.cmake'#137

Merged
MarkSchofield merged 1 commit intomainfrom
mschofie/ewdk-fix
Nov 17, 2025
Merged

Fixes to 'Windows.EWDK.toolchain.cmake'#137
MarkSchofield merged 1 commit intomainfrom
mschofie/ewdk-fix

Conversation

@MarkSchofield
Copy link
Copy Markdown
Owner

Fixes #136.

As Windows.MSVC.toolchain.cmake has been cleaned-up and improved over time it canonicalized supported CMAKE_SYSTEM_PROCESSOR values and - inadvertently broke Windows.EWDK.toolchain.cmake. Since GitHub runners don't have the EWDK installed, and don't have enough free space to install the EWDK, then it's tricky to catch such regressions. This change fixes things, making a few changes:

  1. Rather than setting CMAKE_SYSTEM_PROCESSOR to $ENV{VSCMD_ARG_TGT_ARCH}, I'm checking $ENV{VSCMD_ARG_TGT_ARCH} and setting CMAKE_SYSTEM_PROCESSOR to the correct value.
  2. If the $ENV{VSCMD_ARG_TGT_ARCH} corresponds to a matching CMAKE_HOST_SYSTEM_PROCESSOR, then CMAKE_SYSTEM_PROCESSOR isn't set to avoid 'cross-compiling'.
  3. This change set EWDK to 1 to denote that EWDK is being used.
  4. If EWDK is set, then the CUDA examples aren't compiled; they don't appear to work with the EWDK.
  5. I'm adding a 'condition' to the 'ewdk' example preset so that it's excluded unless CMake is being run from an EWDK prompt.

I validated with the "EWDK_ge_release_svc_prod1_26100_250904-1728.iso" EWDK. I mounted the ISO to E: and ran:

& cmd /c "E:\BuildEnv\SetupBuildEnv.cmd x86 && set && cmake --preset ewdk && cmake --build --preset ewdk"
& cmd /c "E:\BuildEnv\SetupBuildEnv.cmd x86_arm64 && set && cmake --preset ewdk && cmake --build --preset ewdk"
& cmd /c "E:\BuildEnv\SetupBuildEnv.cmd amd64 && set && cmake --preset ewdk && cmake --build --preset ewdk"

@MarkSchofield MarkSchofield force-pushed the mschofie/ewdk-fix branch 2 times, most recently from 403ca2c to c208621 Compare November 17, 2025 04:19
@MarkSchofield MarkSchofield merged commit 714180f into main Nov 17, 2025
19 checks passed
@MarkSchofield MarkSchofield deleted the mschofie/ewdk-fix branch November 17, 2025 04:43
InCom-0 pushed a commit to InCom-0/cmake_WindowsToolchain that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EWDK toolchain is broken - it uses 'old' constructs

1 participant