diff options
author | Brad King <brad.king@kitware.com> | 2023-01-12 19:35:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-12 19:35:38 (GMT) |
commit | 81f670fa833e54a91b1b17eabade3162f31582f0 (patch) | |
tree | cd2eeb252d8e1a9a6b7361bda70d9696c79ef81d /Tests/VSMASM | |
parent | e4c281e45196b3c3fa2f327476838ac77b76e838 (diff) | |
download | CMake-81f670fa833e54a91b1b17eabade3162f31582f0.zip CMake-81f670fa833e54a91b1b17eabade3162f31582f0.tar.gz CMake-81f670fa833e54a91b1b17eabade3162f31582f0.tar.bz2 |
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
Diffstat (limited to 'Tests/VSMASM')
-rw-r--r-- | Tests/VSMASM/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/VSMASM/foo.asm | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Tests/VSMASM/CMakeLists.txt b/Tests/VSMASM/CMakeLists.txt index 603a43b..49bd24a 100644 --- a/Tests/VSMASM/CMakeLists.txt +++ b/Tests/VSMASM/CMakeLists.txt @@ -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) diff --git a/Tests/VSMASM/foo.asm b/Tests/VSMASM/foo.asm index 51cb969..97bdd1a 100644 --- a/Tests/VSMASM/foo.asm +++ b/Tests/VSMASM/foo.asm @@ -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 |