From 5f8e4de696fcdfa39fbaeace7a802a1d3cdf9e2f Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 15 Dec 2022 11:56:16 -0500 Subject: 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 --- Modules/CMakeASM_MARMASMInformation.cmake | 4 ++++ Tests/VSMARMASM/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v0.12