How to compile linear assemble?

/usr/share/cmake/Modules/Compiler/TI-ASM.cmake:

include(Compiler/TI)
__compiler_ti(ASM)

set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm;s;abs)

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.

code is here.

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:

set(__COMPILER_TI_SOURCE_FLAG_ASM "--asm_file")