summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-12-15 16:56:16 (GMT)
committerBrad King <brad.king@kitware.com>2022-12-15 19:04:54 (GMT)
commit5f8e4de696fcdfa39fbaeace7a802a1d3cdf9e2f (patch)
treea9031377e7bc4a3f1db00d7f6ff0af6af87fdf65
parentf62a0f53bf6858d9d5aae6249a89d6b1dca32bac (diff)
downloadCMake-5f8e4de696fcdfa39fbaeace7a802a1d3cdf9e2f.zip
CMake-5f8e4de696fcdfa39fbaeace7a802a1d3cdf9e2f.tar.gz
CMake-5f8e4de696fcdfa39fbaeace7a802a1d3cdf9e2f.tar.bz2
ASM_MARMASM: Populate MSVC debug information format abstraction table
In commit 3166547cf6 (ASM_MARMASM: Add support for Microsoft ARM assembler language, 2022-10-14) we overlooked populating the runtime library selection flags for the Microsoft ARM assembler, needed since commit 0e96a20478 (MSVC: Add abstraction for debug information format, 2022-08-25, v3.25.0-rc1~142^2~1). Its compiler id is `MSVC`, so our generators expect the table to be populated. It only supports `Embedded` debug info. Use empty flags for the other formats. Without this fix, enabling the `ASM_MARMASM` language with policy `CMP0141` set to `NEW` causes an error due to the missing table entries. Issue: #24249
-rw-r--r--Modules/CMakeASM_MARMASMInformation.cmake4
-rw-r--r--Tests/VSMARMASM/CMakeLists.txt2
2 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakeASM_MARMASMInformation.cmake b/Modules/CMakeASM_MARMASMInformation.cmake
index ac81097..2026c17 100644
--- a/Modules/CMakeASM_MARMASMInformation.cmake
+++ b/Modules/CMakeASM_MARMASMInformation.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 "-g")
+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/Tests/VSMARMASM/CMakeLists.txt b/Tests/VSMARMASM/CMakeLists.txt
index eb1bfdb..6d78e04 100644
--- a/Tests/VSMARMASM/CMakeLists.txt
+++ b/Tests/VSMARMASM/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.25) # Enable CMP0141
project(VSMARMASM C ASM_MARMASM)
add_executable(VSMARMASM main.c foo.asm)