[CMake] call compiler with multiple sources at the same time
Mayer, Uwe
Mayer at beyerdynamic.de
Thu Oct 15 08:32:27 EDT 2015
I am using cmake for cross-compiling to a TI C55x DSP with Windows as the host system. The build process is basically working, however the produced binaries are significantly larger than what the TI Code Composer Studio 6 (CCS6) would produce. The only difference, according to the CCS6 Makefile, is that CMake will compile each .c file individually and then link them together. The CCS6 Makefile will call the compiler once with all sources, i.e.
$ <PATH_TO_COMPILER>/cl55.exe <FLAGS> source1.c source2.c source3.c ... --output_file=target.obj
This seems to make a difference because of an optimization flag from the cl55 compiler "--program_level_compile" which optimizes "stuff" across all input source files.
(How) is it possible to achieve that behaviour with CMake aswell, i.e. by modifying CMAKE_C_COMPILE_OBJECT? If possible: where can I read up on that?
Thanks in advance,
Uwe
This message has been scanned for malware by Websense. www.websense.com
More information about the CMake
mailing list