However, TI has a special assemble named linear assemble:
$ cl6x --help
...
Default File Extensions Options:
--ap_extension,-el=.ext Extension for linear asm files (default is .sa)
--asm_extension,-ea=.ext Extension for assembly files (default is .asm)
--c_extension,-ec=.ext Extension for C files (default is .c)
...
I try to list(APPEND CMAKE_ASM_SOURCE_FILE_EXTENSIONS sa), but it still not work. cmake --build build will not compile *.sa.
We can add to the extension list (there’s also a regex that does some filtering). However, manually setting the source file’s LANGUAGE property should override any such behaviors.
The problem is how to distinguish *.asm and *.ap? *.asm need --asm_extension, *.ap need --ap_extension. However, in /usr/share/cmake/Modules/Compiler/TI.cmake:
I guess it should be added as assembler dialect. CMake has support for that (e.g. choosing NASM or MASM), which makes it easier than a complete new language.