summaryrefslogtreecommitdiff
path: root/Tests/VSMARMASM
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-26 12:55:41 -0500
committerBrad King <brad.king@kitware.com>2023-01-26 12:56:25 -0500
commitb44714a6429c48c2cabe53fce100bc20c6f8fbfc (patch)
treeea4ac4cf359f41312e2d212a4efa86a9516fdbf0 /Tests/VSMARMASM
parented09c0aecd7c68b3ad2af805fda1449f799a6eae (diff)
downloadcmake-b44714a6429c48c2cabe53fce100bc20c6f8fbfc.tar.gz
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
Diffstat (limited to 'Tests/VSMARMASM')
-rw-r--r--Tests/VSMARMASM/CMakeLists.txt3
-rw-r--r--Tests/VSMARMASM/foo.asm2
2 files changed, 4 insertions, 1 deletions
diff --git a/Tests/VSMARMASM/CMakeLists.txt b/Tests/VSMARMASM/CMakeLists.txt
index 6d78e045b1..85740de18d 100644
--- a/Tests/VSMARMASM/CMakeLists.txt
+++ b/Tests/VSMARMASM/CMakeLists.txt
@@ -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\">"
+ )
diff --git a/Tests/VSMARMASM/foo.asm b/Tests/VSMARMASM/foo.asm
index e5b2775635..44656ef873 100644
--- a/Tests/VSMARMASM/foo.asm
+++ b/Tests/VSMARMASM/foo.asm
@@ -3,7 +3,7 @@
EXPORT foo
foo PROC
- mov w0, #0
+ mov w0, #zero
ret
ENDP