Skip to content

Fix MSVC MASM object paths under CMake - #45

Merged
Coralesoft merged 2 commits into
mainfrom
fix/msvc-masm-object-path
Jul 13, 2026
Merged

Fix MSVC MASM object paths under CMake#45
Coralesoft merged 2 commits into
mainfrom
fix/msvc-masm-object-path

Conversation

@Coralesoft

@Coralesoft Coralesoft commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #43. MASM can fail under the Visual Studio generator when ml64 is given a /Fo path under a source-tree subdirectory such as src/random.

-DCRYPTOPP_DISABLE_ASM=ON remains the workaround for affected builds.

What changed

  • Write all MASM objects flat under $(IntDir) using ObjectFileName.
  • Remove the old rdrand.asm-only /Fo override.
  • Tighten the ARM target check so ARM builds skip the MASM path.

VS 2026 could not be reproduced locally, so the reporter will confirm that toolchain. CI covers the existing VS 2022 ASM path.

Closes #43

Place MASM objects directly under $(IntDir) for Visual Studio generators
instead of relying on source-tree object paths that ml64 may fail to
create.

Also tighten the ARM target check so ARM builds do not enter the MASM
path by mistake.
Remove ASM from `project()` and enable it only for non-MSVC ARM builds.

The x86 and x64 assembly path continues to use ASM_MASM.
@Coralesoft
Coralesoft force-pushed the fix/msvc-masm-object-path branch from 0f1c137 to 554ca38 Compare July 13, 2026 12:42
@Coralesoft
Coralesoft merged commit 554ca38 into main Jul 13, 2026
43 checks passed
@Coralesoft
Coralesoft deleted the fix/msvc-masm-object-path branch July 13, 2026 14:26
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.

MSVC MASM fails with “cannot open file cryptopp.dir...*.asm.obj” on ARM64 host + CMake + VS 2026

1 participant