diff options
author | Brad King <brad.king@kitware.com> | 2020-03-11 15:45:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-13 13:55:36 (GMT) |
commit | 5932f0be4f36f97fcd3ab61a559379a2a1291371 (patch) | |
tree | 41c666f30a0a36bdec6fe5ca0cf08b395e05f506 /Modules/Compiler | |
parent | 0d0aa98c84bca35431f4239e45956c9d24967af4 (diff) | |
download | CMake-5932f0be4f36f97fcd3ab61a559379a2a1291371.zip CMake-5932f0be4f36f97fcd3ab61a559379a2a1291371.tar.gz CMake-5932f0be4f36f97fcd3ab61a559379a2a1291371.tar.bz2 |
ASM: Fix depfile flags for GNU 'as' tool
The GNU `as --help` shows `--MD <file>` as an option to generate depfiles
as needed by Ninja. There is no `-MT <target>` flag but fortunately the
generated files automatically account for the `-o <obj>` flag.
Issue: #20426
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/GNU-ASM.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU-ASM.cmake b/Modules/Compiler/GNU-ASM.cmake index e07401d..ac241ed 100644 --- a/Modules/Compiler/GNU-ASM.cmake +++ b/Modules/Compiler/GNU-ASM.cmake @@ -4,3 +4,7 @@ include(Compiler/GNU) set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S;asm) __compiler_gnu(ASM) + +if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_MATCH STREQUAL "GNU assembler") + set(CMAKE_DEPFILE_FLAGS_ASM${ASM_DIALECT} "--MD <DEPFILE>") +endif() |