summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-13 13:58:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-01-13 13:59:01 (GMT)
commit485a72dc64602a0e1513744bd3855333e1dfb1da (patch)
tree909cfb2efff5c0a5be1430aa7a3c56a45cf2e583
parentbe4dcdf10098e5877e5a2c1ec20da7621b3e5390 (diff)
parent81f670fa833e54a91b1b17eabade3162f31582f0 (diff)
downloadCMake-485a72dc64602a0e1513744bd3855333e1dfb1da.zip
CMake-485a72dc64602a0e1513744bd3855333e1dfb1da.tar.gz
CMake-485a72dc64602a0e1513744bd3855333e1dfb1da.tar.bz2
Merge topic 'vs-masm-flags'
81f670fa83 VS: Honor compile options for MASM Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8068
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx2
-rw-r--r--Tests/VSMASM/CMakeLists.txt2
-rw-r--r--Tests/VSMASM/foo.asm6
3 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 1f45ce3..9734414 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -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);
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