Hi! One solution is to write a wrapper script in your favourite scripting language (Ruby, Python etc) that pretend that it's a compiler. It could recognise the -I option and start the RX compiler with the --include option. It would not hurt to make it recognise other standard flags like "-o" and "-c" in case the RX compiler doesn't support them either.
-- Anders On Wed, Nov 22, 2017 at 10:33 AM, <oliver.za...@egoproducts.com> wrote: > Hi Eric, > > thanks a lot for your help! i'm going to try it on the dev mailing list. > > Cheers, > Oliver > > > > Von: Eric Noulard <eric.noul...@gmail.com> > An: oliver.za...@egoproducts.com > Kopie: CMake Mailinglist <cmake@cmake.org> > 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 <*oliver.za...@egoproducts.com* > <oliver.za...@egoproducts.com>>: > 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* > <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 > <CMakePrefix>/Modules/Compiler (see > *https://github.com/Kitware/CMake/tree/master/Modules/Compiler* > <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* > <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 <*oliver.za...@egoproducts.com* > <oliver.za...@egoproducts.com>>: > 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* > <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* > <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 >
-- 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