<div dir="ltr"><div><div><div><div><div>Dear All, <br><br></div>I found cmake provides many techniques to integrate tools like distcc, ccache into the build system. In particular variables like the following could be used:<br>
<br>-D CMAKE_C_COMPILER="ccache" -D CMAKE_C_COMPILER_ARG1="gcc"<br><br></div>The picture becomes more complicated when the tools around the real compiler requires "special" syntax. As an example the RedHat's scl is such a one as it's requires quotation of the complete compiler line:<br>
<br> scl enable devtoolset-2 'g++ -o output_file source_file...'<br><br></div>Details: <a href="https://access.redhat.com/site/documentation/en-US/Red_Hat_Developer_Toolset/2/html/User_Guide/sect-GCC-CPP.html">https://access.redhat.com/site/documentation/en-US/Red_Hat_Developer_Toolset/2/html/User_Guide/sect-GCC-CPP.html</a><br>
<br><br></div><div>I was playing with build rules, however didn't success on try_compile which seems to ignore them.<br><br>set ( CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> enable devtoolset-2 ' gcc <DEFINES> <FLAGS> -frandom-seed=<SOURCE>/ -o <OBJECT> -c <SOURCE>' ")<br>
<br></div>The only working one that I found is to use small bash script which will act as yet another wrapper.<br></div>Anyway this solution do not looks "elegant" and I would like to avoid.<br><div><div><div><div>
<br clear="all"><div><div>Can anyone suggest a good method how to cope with this issue ?<br>-- <br>Pozdrawiam/Best regards/<span>Mit freundlichen Grüßen, Tomasz Majchrowski</span>,<br>Information Technology and Services Consultant and Contractor
</div></div></div></div></div></div></div>