[cmake-developers] Antwort: Re: Non supported toolchain

2017-11-22 Thread oliver . zabel
Hi Alex, 

thanks for your answer.
1. is there some guide or at least some example?
2. Does this module needs to be in the offical build to be distributed or 
is there a possibility to distribute the modules locally?

Thanks!
Oli



Von:Alexander Neundorf 
An: cmake-developers@cmake.org
Datum:  22.11.2017 21:52
Betreff:Re: [cmake-developers] Non supported toolchain
Gesendet von:   "cmake-developers" 



On 2017 M11 22, Wed 10:37:00 CET oliver.za...@egoproducts.com wrote:
> Hi,
> 
> i know this is the dev mailing list, but i tried to solve my problem in
> the normal one (see here
> https://www.mail-archive.com/cmake@cmake.org/msg57862.html) with no
> success.
> 
> In Short: i have a toolchain for an microcontroller (renesas rx serjes)
> running on windows. I want to build my project with cmake and therefor
> wrote a toolchain file.
> The problem now is, that the compiler needs instead of "-I" for includes
> "-include=" and for defines "-define=". I found out that there seems to 
be
> internal variables CMAKE_INCLUDE_FLAG_C and CMAKE_DEFINE_FLAC_C but they
> don't seem to accesible from the toolchain file.
> 
> Is there any chance beside writing a new module for a compiler to get 
this
> toolchain running?

no, you probably need to write a module file for the compiler. This is 
actually 
not that complicated.

Alex

-- 

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:
http://public.kitware.com/mailman/listinfo/cmake-developers


-- 

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:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] Non supported toolchain

2017-11-22 Thread oliver . zabel
Hi, 

i know this is the dev mailing list, but i tried to solve my problem in 
the normal one (see here 
https://www.mail-archive.com/cmake@cmake.org/msg57862.html) with no 
success.

In Short: i have a toolchain for an microcontroller (renesas rx serjes) 
running on windows. I want to build my project with cmake and therefor 
wrote a toolchain file.
The problem now is, that the compiler needs instead of "-I" for includes 
"-include=" and for defines "-define=". I found out that there seems to be 
internal variables CMAKE_INCLUDE_FLAG_C and CMAKE_DEFINE_FLAC_C but they 
don't seem to accesible from the toolchain file.

Is there any chance beside writing a new module for a compiler to get this 
toolchain running?

Thanks a lot and sorry for asking on the dev list!
Best regards, 

Oliver-- 

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:
http://public.kitware.com/mailman/listinfo/cmake-developers

[CMake] Antwort: Re: Re: Antwort: Antwort: Re:Antwort: Re: Toolchain with non-gcc argument format

2017-11-22 Thread oliver . zabel
Hi Eric, 

thanks a lot for your help! i'm going to try it on the dev mailing list.

Cheers, 
Oliver



Von:Eric Noulard 
An: oliver.za...@egoproducts.com
Kopie:  CMake Mailinglist 
Datum:  22.11.2017 09:49
Betreff:Re: Re: [CMake] Antwort: Antwort: Re:Antwort: Re: 
Toolchain with non-gcc argument format



Hi Olivier,

Putting the list back.
You may try developer list as well.


2017-11-22 9:02 GMT+01:00 :
Hi, 

Is there really no way to override this var with a toolchain file? that 
seems somehow strange to me, since CMAKE is so configurable that i can't 
change "-I" to "-include="  what do i have to do?


I'm sorry I'm a little short in time to investigate that with you at the 
moment and I hope some other people may step in.
The var "CMAKE_INCLUDE_FLAG_C" is NOT a toolchain file variable and it 
won't end-up in the cache file.
AFAIK It is **only** used in compiler detection, e.g. at early stage of 
project configuration when processing project(...)
or enable_language(..)

Adding new toolchain is not as flexible as adding a new **kind** of 
compiler.
The knobs accessing for writing a toolchain are described here:
https://cmake.org/cmake/help/v3.10/manual/cmake-toolchains.7.html

There you can see that:
"Languages are enabled by the project() command. Language-specific 
built-in variables, such as CMAKE_CXX_COMPILER, CMAKE_CXX_COMPILER_ID etc 
are set by invoking the project() command."

Unless I'm wrong the toolchain mechanism does not include the capability 
to change "-I" to "-include".

Now adding a new "kind" of compiler, a.k.a. compiler ID, enables you to 
specify that include directive flag is " -include" (and many other things 
as well)
Adding a new compiler ID requires to add files in 
/Modules/Compiler (see 
https://github.com/Kitware/CMake/tree/master/Modules/Compiler)

as you can see it requires at least a couple of file to find a compiler 
and one file per supported language (C, CXX, etc...)
in the C or CXX specific file you may use CMAKE_INCLUDE_FLAG_C and other 
variables:

see e.g.:
https://github.com/Kitware/CMake/blob/master/Modules/Compiler/TI-C.cmake 

I did never add a new kind of compiler so I hope people with more 
knowlegde than me in this area will explain that part better than me.

Eric

 



2017-11-16 9:44 GMT+01:00 : 
I did not find the CMAKE_INCLUDE_FLAG_C in the CMake cache - is it 
possible that this is somehow ignored? 

This variable is used by CMake **builtin compiler** discovery and 
configuration. 
The file are are put in "Modules/Compiler" there is one per-langage and 
per-compiler ID: 
https://cmake.org/cmake/help/v3.7/variable/CMAKE_LANG_COMPILER_ID.html 

I don't know the exact processing order of this set of files. 

Toolchain files: 
https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html 
does not use or contain such variables. 

-- 
Eric 




-- 
Eric

-- 

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:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] surround executable with flags

2016-08-24 Thread oliver . zabel
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-- 

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:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] surround add_executable with flags

2016-08-24 Thread oliver . zabel
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-- 

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:
http://public.kitware.com/mailman/listinfo/cmake