<p>Hi,</p>
<p>Make sure you delete the builddirectory if you change the toolchain file, in the output you sent all the compiler detection/testing results was cached.</p>
<p>/johan</p>
<div class="gmail_quote">On Feb 4, 2011 10:27 PM, &quot;Enrique Izaguirre&quot; &lt;<a href="mailto:enrique.izaguirre@gmail.com">enrique.izaguirre@gmail.com</a>&gt; wrote:<br type="attribution">&gt; Thanks Alexander,<br>
&gt; Seems that it doesn&#39;t have much information but here it is:<br>&gt; <br>&gt; # cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-linuxcpp.cmake ..<br>&gt; System name is:<br>&gt; Linux<br>&gt; The Top directory is:<br>&gt; /home/x0148488/omapflash<br>
&gt; Adding subdirectory comdriver...<br>&gt; Entering comdriver&#39;s CMakeLists<br>&gt; Now trying to find AdbWinApi.lib library<br>&gt; Adding subdirectory common...<br>&gt; Adding subdirectory host...<br>&gt; -- Configuring done<br>
&gt; CMake Error: Error required internal CMake variable not set, cmake may be<br>&gt; not be built correctly.<br>&gt; Missing variable is:<br>&gt; CMAKE_C_LINK_EXECUTABLE<br>&gt; -- Generating done<br>&gt; -- Build files have been written to: /home/x0148488/omapflash/cmake_build<br>
&gt; <br>&gt; Thanks<br>&gt; <br>&gt; Enrique<br>&gt; <br>&gt; <br>&gt; <br>&gt; 2011/2/4 Alexander Neundorf &lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt;<br>&gt; <br>&gt;&gt; On Friday 04 February 2011, Enrique Izaguirre wrote:<br>
&gt;&gt; &gt; Hello again,<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; I am trying to cross-compile from Windows (actually Cygwin) to Linux.<br>&gt;&gt; &gt; My Toolchain file (Toolchain-linuxcpp.cmake) is as follows:<br>&gt;&gt; &gt;<br>
&gt;&gt; &gt; SET(CMAKE_SYSTEM_NAME Linux)<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; #specify the cross-compiler<br>&gt;&gt; &gt; set (CMAKE_C_COMPILER /bin/gcc-linux)<br>&gt;&gt; &gt; set (CMAKE_CXX_COMPILER /bin/g++-linux)<br>&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>&gt;&gt; &gt; After doing the cmake build using  cmake<br>&gt;&gt; &gt; -DCMAKE_TOOLCHAIN_FILE=../Toolchain-linuxcpp.cmake ..<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; CMake Error: Error required internal CMake variable not set, cmake may be<br>
&gt;&gt; &gt; not be built correctly.<br>&gt;&gt; &gt; Missing variable is:<br>&gt;&gt; &gt; CMAKE_C_LINK_EXECUTABLE<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; I have using both compilers separately and I didn&#39;t have any problem, but<br>
&gt;&gt; &gt; when I put them together in the Toolchain file is when this problems<br>&gt;&gt; comes<br>&gt;&gt; &gt; up.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; What value CMAKE_C_LINK_EXECUTABLE variable should be set? And where?<br>
&gt;&gt;<br>&gt;&gt; This should be set via CMakeCInformation.cmake, which loads the platform-<br>&gt;&gt; and<br>&gt;&gt; compiler specific files, e.g. Modules/Compiler/GNU-C.cmake.<br>&gt;&gt; Can you please post the output of the cmake run ?<br>
&gt;&gt;<br>&gt;&gt; Alex<br>&gt;&gt;<br></div>