[CMake] How to change CMake's expected output filename

Nick Foster bistromat at hotmail.com
Wed Sep 8 13:35:11 EDT 2010


Hi there,

I'm using CMake with SDCC. Currently, support for SDCC in CMake does not also include dialects for its various assemblers. So I've created one, for the asx8051 assembler. The problem is that the asx8051 assembler shows nonstandard behavior, and does not let you arbitrarily name the output. Instead, if you compile myfile.a51, it produces myfile.rel. No option to change that.

CMake tells the linker to then look for an output file named <source_filename><CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION>, which ends up looking for myfile.a51.rel. I can add whatever arbitrary extension I want, but I need to strip the .a51 from CMake's expected output filename so it knows to look for myfile.rel. Should I create a custom command which moves myfile.rel to myfile.a51.rel? It seems unnecessarily Byzantine. Is there an easier way?

Thanks,
Nick
 		 	   		  


More information about the CMake mailing list