[CMake] surround executable with flags

oliver.zabel at egoproducts.com oliver.zabel at egoproducts.com
Wed Aug 24 07:31:56 EDT 2016


Hi, 

i trying to migrate a cross-compiler project (ARM on Windows) from an IDE 
(Cypress PSoC Creator) to cmake. The toolchain is a standard gcc for arm. 
The IDE compiles the binary with

arm-none-eabi-gcc.exe -Wl,--start-group .....  -Wl,--end-group. I'm trying 
to reach the same in cmake, but since add_executable(target main.c) 
together with target_link_libraries() at least the main-file is outside 
the start / end-group. 
Is there a way to achive this? The problem is, that the code-size differs 
between the IDE build and cmake build and i need to know at least why. And 
since the group issue is the last thing, i need to get around it.

Thanks for help!
Best regards, 

Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160824/79912364/attachment.html>


More information about the CMake mailing list