<div dir="ltr">Hi Olivier,<div><br></div><div>Putting the list back.</div><div>You may try developer list as well.</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">2017-11-22 9:02 GMT+01:00  <span dir="ltr"><<a href="mailto:oliver.zabel@egoproducts.com" target="_blank">oliver.zabel@egoproducts.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="2" face="sans-serif">Hi, </font>
<br>
<br><font size="2" face="sans-serif">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?</font></blockquote><div><br></div><div><br></div><div>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.</div><div>The var "CMAKE_INCLUDE_FLAG_C" is NOT a toolchain file variable and it won't end-up in the cache file.</div><div>AFAIK It is **only** used in compiler detection, e.g. at early stage of project configuration when processing project(...)</div><div>or enable_language(..)</div><div><br></div><div>Adding new toolchain is not as flexible as adding a new **kind** of compiler.</div><div>The knobs accessing for writing a toolchain are described here:</div><div><a href="https://cmake.org/cmake/help/v3.10/manual/cmake-toolchains.7.html">https://cmake.org/cmake/help/v3.10/manual/cmake-toolchains.7.html</a><br></div><div><br></div><div>There you can see that:</div>"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."<div><br></div><div>Unless I'm wrong the toolchain mechanism does not include the capability to change "-I" to "-include".</div><div><br></div><div>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)</div><div>Adding a new compiler ID requires to add files in </div><div><CMakePrefix>/Modules/Compiler (see <a href="https://github.com/Kitware/CMake/tree/master/Modules/Compiler">https://github.com/Kitware/CMake/tree/master/Modules/Compiler</a>)<br></div><div><br></div><div>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...)</div><div>in the C or CXX specific file you may use CMAKE_INCLUDE_FLAG_C and other variables:</div><div><br></div><div>see e.g.:</div><div><a href="https://github.com/Kitware/CMake/blob/master/Modules/Compiler/TI-C.cmake">https://github.com/Kitware/CMake/blob/master/Modules/Compiler/TI-C.cmake</a> </div><div><br></div><div>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.</div><div><br></div><div>Eric</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
<br><font size="3">2017-11-16 9:44 GMT+01:00 <</font><a href="mailto:oliver.zabel@egoproducts.com" target="_blank"><font size="3" color="blue"><u>oliver.zabel@egoproducts.com</u></font></a><font size="3">><wbr>:</font>
<br><font size="2" face="sans-serif">I did not find the CMAKE_INCLUDE_FLAG_C
in the CMake cache - is it possible that this is somehow ignored?</font><font size="3">
</font>
<br>
<br><font size="3">This variable is used by CMake **builtin compiler** discovery
and configuration.</font>
<br><font size="3">The file are are put in "Modules/Compiler" there
is one per-langage and per-compiler ID:</font>
<br><a href="https://cmake.org/cmake/help/v3.7/variable/CMAKE_LANG_COMPILER_ID.html" target="_blank"><font size="3" color="blue"><u>https://cmake.org/cmake/help/<wbr>v3.7/variable/CMAKE_LANG_<wbr>COMPILER_ID.html</u></font></a>
<br>
<br><font size="3">I don't know the exact processing order of this set of
files.</font>
<br>
<br><font size="3">Toolchain files:</font>
<br><a href="https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html" target="_blank"><font size="3" color="blue"><u>https://cmake.org/cmake/help/<wbr>v3.7/manual/cmake-toolchains.<wbr>7.html</u></font></a>
<br><font size="3">does not use or contain such variables.</font>
<br><font size="3"><br>
-- </font>
<br><font size="3">Eric</font>
<br>
<br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div></div>