summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeASM_NASMInformation.cmake
diff options
context:
space:
mode:
authorGregor Jasny <gregor.jasny@logmein.com>2021-06-25 10:26:31 (GMT)
committerGregor Jasny <gregor.jasny@logmein.com>2021-06-25 10:28:02 (GMT)
commitf03d54bfc1c9353b0fadfc204d119de6e073aa28 (patch)
tree7dcd71b0436b7664d3aa639ced5ec986ad5ce596 /Modules/CMakeASM_NASMInformation.cmake
parent9a704fd37e42c4f68953ae87fea365a675b6c35d (diff)
downloadCMake-f03d54bfc1c9353b0fadfc204d119de6e073aa28.zip
CMake-f03d54bfc1c9353b0fadfc204d119de6e073aa28.tar.gz
CMake-f03d54bfc1c9353b0fadfc204d119de6e073aa28.tar.bz2
ASM_NASM: Do not generate depfiles with YASM
In 3aec26660a (Merge topic 'nasm_add_deps', 2021-03-03) the ASM_NASM language enabled the generation of GCC compatible depfiles for NASM. Unfortunatly, those are not supported by YASM. Fixes: #22341
Diffstat (limited to 'Modules/CMakeASM_NASMInformation.cmake')
-rw-r--r--Modules/CMakeASM_NASMInformation.cmake16
1 files changed, 9 insertions, 7 deletions
diff --git a/Modules/CMakeASM_NASMInformation.cmake b/Modules/CMakeASM_NASMInformation.cmake
index 27b93ec..dad2750 100644
--- a/Modules/CMakeASM_NASMInformation.cmake
+++ b/Modules/CMakeASM_NASMInformation.cmake
@@ -38,13 +38,15 @@ if(NOT CMAKE_ASM_NASM_COMPILE_OBJECT)
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
endif()
-set(CMAKE_DEPFILE_FLAGS_ASM_NASM "-MD <DEP_FILE> -MT <DEP_TARGET>")
-
-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)
+if(CMAKE_ASM_NASM_COMPILER_ID STREQUAL "NASM")
+ set(CMAKE_DEPFILE_FLAGS_ASM_NASM "-MD <DEP_FILE> -MT <DEP_TARGET>")
+
+ 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()
endif()
# Load the generic ASMInformation file: