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:
Brad King 2023-01-26 12:55:41 -05:00
parent ed09c0aecd
commit b44714a642
4 changed files with 6 additions and 10 deletions

View File

@ -3822,6 +3822,8 @@ bool cmVisualStudio10TargetGenerator::ComputeMarmasmOptions(
this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget, this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget,
cmBuildStep::Compile, "ASM_MARMASM", cmBuildStep::Compile, "ASM_MARMASM",
configName); configName);
this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget,
"ASM_MARMASM", configName);
marmasmOptions.Parse(flags); marmasmOptions.Parse(flags);

View File

@ -119,15 +119,6 @@
"value": "true", "value": "true",
"flags": [] "flags": []
}, },
{
"name": "PredefineDirective",
"switch": "predefine",
"comment": "Specify a SETA, SETL, or SETS directive to predefine a symbol.",
"value": "",
"flags": [
"UserValue"
]
},
{ {
"name": "SourceLink", "name": "SourceLink",
"switch": "sourcelink", "switch": "sourcelink",

View File

@ -1,3 +1,6 @@
cmake_minimum_required(VERSION 3.25) # Enable CMP0141 cmake_minimum_required(VERSION 3.25) # Enable CMP0141
project(VSMARMASM C ASM_MARMASM) project(VSMARMASM C ASM_MARMASM)
add_executable(VSMARMASM main.c foo.asm) add_executable(VSMARMASM main.c foo.asm)
target_compile_options(VSMARMASM PRIVATE
"$<$<COMPILE_LANGUAGE:ASM_MARMASM>:SHELL:-predefine \"zero SETA 0\">"
)

View File

@ -3,7 +3,7 @@
EXPORT foo EXPORT foo
foo PROC foo PROC
mov w0, #0 mov w0, #zero
ret ret
ENDP ENDP