[CMake] CMake Error: Error required internal CMake variable not set

Enrique Izaguirre enrique.izaguirre at gmail.com
Fri Feb 4 16:26:38 EST 2011


Thanks Alexander,
Seems that it doesn't have much information but here it is:

# cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-linuxcpp.cmake ..
System name is:
Linux
The Top directory is:
/home/x0148488/omapflash
Adding subdirectory comdriver...
Entering comdriver's CMakeLists
Now trying to find AdbWinApi.lib library
Adding subdirectory common...
Adding subdirectory host...
-- Configuring done
CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
Missing variable is:
CMAKE_C_LINK_EXECUTABLE
-- Generating done
-- Build files have been written to: /home/x0148488/omapflash/cmake_build

Thanks

Enrique



2011/2/4 Alexander Neundorf <a.neundorf-work at gmx.net>

> On Friday 04 February 2011, Enrique Izaguirre wrote:
> > Hello again,
> >
> > I am trying to cross-compile from Windows (actually Cygwin) to Linux.
> > My Toolchain file (Toolchain-linuxcpp.cmake) is as follows:
> >
> > SET(CMAKE_SYSTEM_NAME Linux)
> >
> > #specify the cross-compiler
> > set (CMAKE_C_COMPILER /bin/gcc-linux)
> > set (CMAKE_CXX_COMPILER /bin/g++-linux)
> >
> >
> > After doing the cmake build using  cmake
> > -DCMAKE_TOOLCHAIN_FILE=../Toolchain-linuxcpp.cmake ..
> >
> > CMake Error: Error required internal CMake variable not set, cmake may be
> > not be built correctly.
> > Missing variable is:
> > CMAKE_C_LINK_EXECUTABLE
> >
> >
> > I have using both compilers separately and I didn't have any problem, but
> > when I put them together in the Toolchain file is when this problems
> comes
> > up.
> >
> > What value CMAKE_C_LINK_EXECUTABLE variable should be set? And where?
>
> This should be set via CMakeCInformation.cmake, which loads the platform-
> and
> compiler specific files, e.g. Modules/Compiler/GNU-C.cmake.
> Can you please post the output of the cmake run ?
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110204/6482ea74/attachment.htm>


More information about the CMake mailing list