Separate C and ASM options per target
Hi,
starting from a set of sources, I am trying to generate different targets from same pool of sources with different options. My toolchain is ARM RVCT 5.06. This toolchain distinguish between C compiler (armcc) and ASM compiler (armasm). These two compilers accept completely different options. Also macros are passed as -D in armcc and --predefine in armasm.
My problem is that I am trying to add some C compiler options specific for each target to C sources only. For this, I tried using:
set_target_properties( mytargetX COMPILE_OPTIONS "${myoptionsfortargetX}" )
With this command, myoptionsfortargetX are passed to both C and ASM compilers for mytargetX, as I can see from flags.make. But I can get different options for each target.
So I tried to separate C and ASM files and set options with:
set_source_files_properties( ${mysources} PROPERTIES COMPILE_FLAGS ${myoptionsfortargetX} )
But doing this, myoptions are the same for all targets, while I want to have different C options for each target.
Is there a way to accomplish my job?
If not, could you think to add more properties, like COMPILE_C_OPTIONS and COMPILE_ASM_OPTIONS, to distinguish between C and ASM files for target properties, leaving COMPILE_OPTIONS as is?
Thanks