summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-12-15 16:55:09 (GMT)
committerBrad King <brad.king@kitware.com>2022-12-15 16:55:09 (GMT)
commitf62a0f53bf6858d9d5aae6249a89d6b1dca32bac (patch)
tree5db80c7fe6fd9a36977f04e4aef16eea9d1ede27
parent26ab6691736d4db27a37162173054b14f86bae05 (diff)
parenta9bd1e34ef220c5467111dbe8703b39e85aa1f14 (diff)
downloadCMake-f62a0f53bf6858d9d5aae6249a89d6b1dca32bac.zip
CMake-f62a0f53bf6858d9d5aae6249a89d6b1dca32bac.tar.gz
CMake-f62a0f53bf6858d9d5aae6249a89d6b1dca32bac.tar.bz2
Merge branch 'backport-masm-debug-format' into masm-debug-format
-rw-r--r--Modules/CMakeASM_MASMInformation.cmake4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx4
-rw-r--r--Tests/VSMASM/CMakeLists.txt2
3 files changed, 9 insertions, 1 deletions
diff --git a/Modules/CMakeASM_MASMInformation.cmake b/Modules/CMakeASM_MASMInformation.cmake
index 656b75e..11b83662 100644
--- a/Modules/CMakeASM_MASMInformation.cmake
+++ b/Modules/CMakeASM_MASMInformation.cmake
@@ -16,5 +16,9 @@ set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDL
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "")
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_Embedded "-Zi")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_ProgramDatabase "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_EditAndContinue "")
+
include(CMakeASMInformation)
set(ASM_DIALECT)
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f5396f4..1f45ce3 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3859,6 +3859,10 @@ bool cmVisualStudio10TargetGenerator::ComputeMasmOptions(
this->LocalGenerator, Options::MasmCompiler, gg->GetMasmFlagTable());
Options& masmOptions = *pOptions;
+ // MSBuild enables debug information by default.
+ // Disable it explicitly unless a flag parsed below re-enables it.
+ masmOptions.AddFlag("GenerateDebugInformation", "false");
+
std::string flags;
this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget,
cmBuildStep::Compile, "ASM_MASM",
diff --git a/Tests/VSMASM/CMakeLists.txt b/Tests/VSMASM/CMakeLists.txt
index 2923e15..603a43b 100644
--- a/Tests/VSMASM/CMakeLists.txt
+++ b/Tests/VSMASM/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.25) # Enable CMP0141
project(VSMASM C ASM_MASM)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DTESTx64)