From fcf16e9459044cc78db724998b7e69849b27b748 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Sun, 28 Feb 2021 16:33:54 +0100 Subject: ASM_NASM: Add depfile generation --- Modules/CMakeASM_NASMInformation.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/CMakeASM_NASMInformation.cmake b/Modules/CMakeASM_NASMInformation.cmake index 97cb488..f84ad55 100644 --- a/Modules/CMakeASM_NASMInformation.cmake +++ b/Modules/CMakeASM_NASMInformation.cmake @@ -38,6 +38,8 @@ if(NOT CMAKE_ASM_NASM_COMPILE_OBJECT) set(CMAKE_ASM_NASM_COMPILE_OBJECT " -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o ") endif() +set(CMAKE_DEPFILE_FLAGS_ASM_NASM "-MD -MT ") + # Load the generic ASMInformation file: set(ASM_DIALECT "_NASM") include(CMakeASMInformation) -- cgit v0.12 From 48e74ec1e6d90a97a6d4ffd435c0135150f58602 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Tue, 2 Mar 2021 12:27:47 +0100 Subject: ASM_NASM: generate depfiles for other makefiles --- Modules/CMakeASM_NASMInformation.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Modules/CMakeASM_NASMInformation.cmake b/Modules/CMakeASM_NASMInformation.cmake index f84ad55..27b93ec 100644 --- a/Modules/CMakeASM_NASMInformation.cmake +++ b/Modules/CMakeASM_NASMInformation.cmake @@ -40,6 +40,13 @@ endif() set(CMAKE_DEPFILE_FLAGS_ASM_NASM "-MD -MT ") +if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER) + AND CMAKE_GENERATOR MATCHES "Makefiles|WMake") + # dependencies are computed by the compiler itself + set(CMAKE_ASM_NASM_DEPFILE_FORMAT gcc) + set(CMAKE_ASM_NASM_DEPENDS_USE_COMPILER TRUE) +endif() + # Load the generic ASMInformation file: set(ASM_DIALECT "_NASM") include(CMakeASMInformation) -- cgit v0.12