I'm using cmake 2.6.1 under Ubuntu Linux to cross compile for a target. I have a toolchain file which sets the full paths to the cross compiler binaries.The c-compiler and c++ compiler always work and setup correctly and appear in the CMakeCache.txt file. However, the other binutils, such as 'ar', 'ranlib', 'objcopy' and so on, just show up as blank entries in the CMakeCache.txt file.
<div><br>
</div>
<div>The CMakeFiles/ directories actually work, except for the link.txt files for the lib portions, which generate everything for the 'ar' command correctly, but simply omit the command itself entirely. After several fidgets with ccmake and manually editing everything in the CMakeCache.txt file with vi, and deleting and regenerating the CMakeFiles/ directory, it will eventually generate the correct link.txt command.</div>
<div><br>
</div>
<div>I'm stumped at this point and I need to get this cleaned up so the rest of my team can check out and build the code without manually fussing around with cmake-generated products first. </div>
<div><br>
</div>
<div>For instance: </div>
<div><br>
</div>
<div>Excerpt of cmake-toolchain file:</div>
<div><br>
</div>
<div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Toolchain-arm-none-linux-gnueabi.cmake</span></span><span class="Apple-style-span" style="font-size: small;"><br>
</span></div>
<div><br>
</div>
<div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Co urier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;"># specify the cross compiler</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;">SET(CMAKE_AR ${MY_CROSS_DIR}/${MY_CROSS_prefix}ar)</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;">SET(CMAKE_CXX_COMPILER ${MY_CROSS_DIR}/${MY_CROSS_prefix}c++)</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;">SET(CMAKE_C_COMPILER ${MY_CROSS_DIR}/${MY_CROSS_prefix}gcc)</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;">SET(CMAKE_LINKER ${MY_CROSS_DIR}/${MY_CROSS_prefix}ld)</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;">SET(CMAKE_NM ${MY_CROSS_DIR}/${MY_CROSS_prefix}nm)</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class= "Apple-style-span" style="font-size: small;">SET(CMAKE_OBJCOPY ${MY_CROSS_DIR}/${MY_CROSS_prefix}objcopy)</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;">SET(CMAKE_OBJDUMP ${MY_CROSS_DIR}/${MY_CROSS_prefix}objdump)</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;">SET(CMAKE_RANLIB ${MY_CROSS_DIR}/${MY_CROSS_prefix}ranlib)</span></span></div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, mono;"><span class="Apple-style-span" style="font-size: small;">SET(CMAKE_STRIP ${MY_CROSS_DIR}/${MY_CROSS_prefix}strip)</span></span></div>
<div><br>
</div>
<div>Excerpts of the resulting CMakeCache.txt file:<br>
</div>
<div><br>
</div>
<div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">########################</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"># EXTERNAL cache entries</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">########################</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"><br>
</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">//Path to a program.</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">CMAKE_AR:FILEPATH=</div>
<div style ="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><br>
</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">(snip)</span><br>
</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><br>
</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">//CXX compiler.</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">CMAKE_CXX_COMPILER:FILEPATH=(my full path to the cross directory)/arm-none-linux-gnueabi-c++</div>
<div><br>
</div>
<div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">(snip)</span><br>
</div>
<div><br>
</div>
<div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">//C compiler.</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">CMAKE_C_COMPILER:FILEPATH=(my full path to the cross directory)/arm-none-linux-gnueabi-gcc</div>
<div><br>
</div>
<div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">(snip)</span><br>
</div>
<div><br>
</div>
<div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">//Path to a program.</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">CMAKE_NM:FILEPATH=</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">//Path to a program.</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">CMAKE_OBJCOPY:FI
LEPATH=</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">//Path to a program.</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">CMAKE_OBJDUMP:FILEPATH=</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">//Path to a program.</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">CMAKE_STRIP:FILEPATH=</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><br>
</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">(snip)</span><br>
</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><br>
</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">//The CMake toolchain file</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">CMAKE_TOOLCHAIN_FILE:FILEPATH=(path to my toolchain file)/Toolchain-arm-none-linux-gnueabi.cmake</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><br>
</div>
<div style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id='MAILCIAMA017-5c5648fe3a4d229' class='aol_ad_footer'> </div>