On 29.08.2019 22:38, fdk17 wrote:
On Thu, Aug 29, 2019, at 2:52 PM, Kyle Edwards via CMake wrote:
On Thu, 2019-08-29 at 18:27 +0100, hex wrote:
> hello community,

> CMake builds a C project with gcc -o target_name. I have a compiler
> very similar to GCC and I am trying configure CMake C language for
> it.

> The compiler does not support the -o argument when linking objects. I
> wonder if there is a way to remove or modify this argument, maybe
> through one of the properties on targets?

> thank you

Your best bet would be to modify the CMake source code to support your
compiler. (Upstreaming your changes would be welcome.)

As a matter of interest, what does it use instead of -o?

Kyle

If you are using the Makefile generator then try:
You may then be able to provide the rules needed, refer to "Modules/CMakeCInformation.cmake".
The way I understand it is that the rule templates are used by the Makefile generator.


The way I understand the documentation, CMAKE_USER_MAKE_RULES_OVERRIDE applies for all generators, not just the Makefile one. What you are apparently supposed to do is create a file that sets all the "rule variables" as required (in this case, CMAKE_C_COMPILE_OBJECT), and then include that file via CMAKE_USER_MAKE_RULES_OVERRIDE. I'm not sure if these 'rule variables' are documented anywhere - but you can look into "<path where CMake is installed>/share/cmake-<version>/Modules/Compiler" for inspiration. Another good starting point would be "<...>/share/cmake-<version>/Modules/CMakeCInformation.cmake".

With kind regards,
Eric

Dr. Eric Dönges
Senior Software Engineer

MVTec Software GmbH | Arnulfstr. 205 | 80634 Munich | Germany
[email protected] | Tel: +49 89 457 695-0 | www.mvtec.com

 Sign up for our MVTec Newsletter!

Geschäftsführer: Dr. Wolfgang Eckstein, Dr. Olaf Munkelt
Amtsgericht München HRB 114695

 

MVTec Software GmbH Logo
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to