VS: Honor compile options for ASM_MARMASM
The Ninja and Makefile generators honor `target_compile_options` and friends for ASM_MARMMASM `.asm` sources. Teach the VS generator to honor them too for consistency. Issue: #24289
This commit is contained in:
parent
ed09c0aecd
commit
b44714a642
@ -3822,6 +3822,8 @@ bool cmVisualStudio10TargetGenerator::ComputeMarmasmOptions(
|
||||
this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget,
|
||||
cmBuildStep::Compile, "ASM_MARMASM",
|
||||
configName);
|
||||
this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget,
|
||||
"ASM_MARMASM", configName);
|
||||
|
||||
marmasmOptions.Parse(flags);
|
||||
|
||||
|
@ -119,15 +119,6 @@
|
||||
"value": "true",
|
||||
"flags": []
|
||||
},
|
||||
{
|
||||
"name": "PredefineDirective",
|
||||
"switch": "predefine",
|
||||
"comment": "Specify a SETA, SETL, or SETS directive to predefine a symbol.",
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserValue"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SourceLink",
|
||||
"switch": "sourcelink",
|
||||
|
@ -1,3 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.25) # Enable CMP0141
|
||||
project(VSMARMASM C ASM_MARMASM)
|
||||
add_executable(VSMARMASM main.c foo.asm)
|
||||
target_compile_options(VSMARMASM PRIVATE
|
||||
"$<$<COMPILE_LANGUAGE:ASM_MARMASM>:SHELL:-predefine \"zero SETA 0\">"
|
||||
)
|
||||
|
@ -3,7 +3,7 @@
|
||||
EXPORT foo
|
||||
|
||||
foo PROC
|
||||
mov w0, #0
|
||||
mov w0, #zero
|
||||
ret
|
||||
ENDP
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user