Skip to content

Include the VS toolset and Win32 SDK binary paths in the CMAKE_PROGRAM_PATH#119

Merged
MarkSchofield merged 1 commit intomainfrom
mschofie/program-path
Nov 2, 2024
Merged

Include the VS toolset and Win32 SDK binary paths in the CMAKE_PROGRAM_PATH#119
MarkSchofield merged 1 commit intomainfrom
mschofie/program-path

Conversation

@MarkSchofield
Copy link
Copy Markdown
Owner

#114 called out that toolset-related tooling can't be found in CMake using a common CMake idiom - find_program relying on CMAKE_PROGRAM_PATH. In the case of #114, it was nmake, but in investigating #115, it would also be useful in finding MASM - allowing the default CMake logic to find MASM without explicitly setting/managing, say, CMAKE_ASM_MASM_COMPILER. This PR adds two paths to CMAKE_PROGRAM_PATH:

  1. The path to the host- and target- resolved path to the MSVC toolset tools.
    This would allow CMake to find, say, nmake.exe, ml64.exe and armasm64.exe.
  2. The path to the Windows SDK binaries.
    This would allow CMake to find, say, mt.exe and signtool.exe.

There's an option to opt-out: setting TOOLCHAIN_UPDATE_PROGRAM_PATH to OFF will not update CMAKE_PROGRAM_PATH.

@MarkSchofield MarkSchofield merged commit b891f0a into main Nov 2, 2024
@MarkSchofield MarkSchofield deleted the mschofie/program-path branch November 2, 2024 18:35
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.

1 participant