VS: Honor compile options for MASM
The Ninja and Makefile generators honor `target_compile_options` and friends for MASM `.asm` sources. Teach the VS generator to honor them too for consistency. Fixes: #24289
This commit is contained in:
parent
e4c281e451
commit
81f670fa83
@ -3867,6 +3867,8 @@ bool cmVisualStudio10TargetGenerator::ComputeMasmOptions(
|
||||
this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget,
|
||||
cmBuildStep::Compile, "ASM_MASM",
|
||||
configName);
|
||||
this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget,
|
||||
"ASM_MASM", configName);
|
||||
|
||||
masmOptions.Parse(flags);
|
||||
|
||||
|
@ -8,3 +8,5 @@ else()
|
||||
endif()
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
add_executable(VSMASM main.c foo.asm)
|
||||
target_compile_definitions(VSMASM PUBLIC DEF_FOO)
|
||||
target_compile_options(VSMASM PUBLIC -DDEF_BAR)
|
||||
|
@ -1,3 +1,9 @@
|
||||
ifndef DEF_FOO
|
||||
.err <DEF_FOO incorrectly not defined>
|
||||
endif
|
||||
ifndef DEF_BAR
|
||||
.err <DEF_BAR incorrectly not defined>
|
||||
endif
|
||||
ifndef TESTx64
|
||||
.386
|
||||
.model flat, c
|
||||
|
Loading…
Reference in New Issue
Block a user