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

Enrique Izaguirre enrique.izaguirre at gmail.com
Fri Feb 4 15:11:37 EST 2011


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?

Thanks in advance

Best Regards

Enrique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110204/937d62f5/attachment.htm>


More information about the CMake mailing list