Skip to content

ASM_NASM: Improve support for standalone usage

Vito Gamberini requested to merge vito.gamberini/cmake:nasm into master
  • Add tests for standalone NASM usage
  • Change generic ASM_NASM executable linker to <CMAKE_LINKER>
  • Use CMAKE_SYSTEM_PROCESSOR to determine output format when used without C/CXX compiler

MR Notes: This supports using NASM (and maybe other assemblers) without enabling C or CXX and adds a tiny test to check that. This usage is common in academic contexts.

Changing CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE from <CMAKE_ASM${ASM_DIALECT}_COMPILER> to <CMAKE_LINKER> affects all ASM dialects and maybe deserves a policy guard. However, I don't think this behavior is correct for any ASM dialect. AFAIK, no popular assembler can also serve as a frontend driver for the linker, so the only appropriate thing is to defer to the provided/detected system linker. EDIT: revised for !9306 (comment 1489798)

Edited by Brad King

Merge request reports