Skip to content

Comments

Accommodate more variables being set by callers (for MT, RC, C- and C++- compilers)#152

Merged
MarkSchofield merged 1 commit intomainfrom
mschofie/less-stomping
Feb 2, 2026
Merged

Accommodate more variables being set by callers (for MT, RC, C- and C++- compilers)#152
MarkSchofield merged 1 commit intomainfrom
mschofie/less-stomping

Conversation

@MarkSchofield
Copy link
Owner

#148 highlights opportunities for using WindowsToolchains for finding, say, Windows SDKs, but using other tooling - like LLVM's 'mt' or 'rc' - for compilation steps. That's a bit tricky at the minute, because Windows.Kits.cmake/Windows.Clang.toolchain.cmake/Windows.MSVC.toolchain.cmake make too many assumptions. This change;

  1. Updates Windows.Kits.cmake to only set CMAKE_MT or CMAKE_RC_COMPILER[_INIT] if values aren't already set. This allows callers to prefer llvm-mt or llvm-rc.
  2. Updates Windows.Clang.toolchain.cmake to not set CMAKE_C_COMPILER or CMAKE_CXX_COMPILER if they have already been set.
  3. Adds the appropriate variables to CMAKE_TRY_COMPILE_PLATFORM_VARIABLES to ensure that the caller-provided values are propagated into 'try compile'.

@MarkSchofield MarkSchofield merged commit 1049a06 into main Feb 2, 2026
21 checks passed
@MarkSchofield MarkSchofield deleted the mschofie/less-stomping branch February 2, 2026 07:32
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.

1 participant