[CMake] cross compiler c166.exe

Alexander Neundorf a.neundorf-work at gmx.net
Sun Jul 25 13:30:53 EDT 2010


On Tuesday 13 July 2010, Thomas Hafner wrote:
> Hello,
>
> CMake is complaining about missing settings:
> | CMake Error at C:/Programme/CMake
> | 2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22
> | (GET_FILENAME_COMPONENT): get_filename_component called with incorrect
> | number of arguments Call Stack (most recent call first):
> |   C:/Programme/CMake
> | 2.8/share/cmake-2.8/Modules/Platform/Windows-cl.cmake:32
> | (ENABLE_LANGUAGE) C:/Programme/CMake
> | 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:58 (INCLUDE)
> | CMakeLists.txt:2 (PROJECT)
> |
> |
> | CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
> | CMake Error: your C compiler: "cl" was not found.   Please set
> | CMAKE_C_COMPILER to a valid compiler path or name. CMake Error: Internal
> | CMake error, TryCompile configure of cmake failed -- Check for working C
> | compiler: cl -- broken
> | CMake Error at C:/Programme/CMake
> | 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): The C
> | compiler "cl" is not able to compile a simple test program.
> |
> |   It fails with the following output:
> |
> |
> |
> |
> |
> |   CMake will not be able to correctly generate this project.
> | Call Stack (most recent call first):
> |   CMakeLists.txt:12 (project)
> |
> |
> | CMake Error: your C compiler: "cl" was not found.   Please set
> | CMAKE_C_COMPILER to a valid compiler path or name. CMake Error: your CXX
> | compiler: "cl" was not found.   Please set CMAKE_CXX_COMPILER to a valid
> | compiler path or name.
>
> I've already taken the Article about CMake Cross Compiling
> <http://www.cmake.org/Wiki/CMake_Cross_Compiling> into consideration and
>
> have coded this:
> | include(CMakeForceCompiler)
> | set(ISOAGLIB_C166INSTALLATIONDIR "c:/c166")
> | set(CMAKE_SYSTEM_NAME Generic)
> | cmake_force_c_compiler("${ISOAGLIB_C166INSTALLATIONDIR}/bin/c166.exe"
> | GNU)
> | cmake_force_cxx_compiler("${ISOAGLIB_C166INSTALLATIONDIR}/bin/c166.exe"
> | GNU) set(CMAKE_C_COMPILER,
> | "${ISOAGLIB_C166INSTALLATIONDIR}/bin/c166.exe") set(CMAKE_CXX_COMPILER,
> | "${ISOAGLIB_C166INSTALLATIONDIR}/bin/c166.exe") message(STATUS "(compiler
> | ${ISOAGLIB_C166INSTALLATIONDIR}/bin/c166.exe)") set(CMAKE_FIND_ROOT_PATH,
> |   "${ISOAGLIB_C166INSTALLATIONDIR}/include.cpp",
> |   "${ISOAGLIB_C166INSTALLATIONDIR}/include",
> |   "${ISOAGLIB_C166INSTALLATIONDIR}/lib")
> | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
> | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
> | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
>
> What's wrong with it? What's the compiler id? CMake does not know my
> cross compiler so far. Which compiler id should I take? How can I tell
> CMake, that there's no resource compiler? Why is CMake looking for a
> compiler called "cl", although my compiler is "c166.exe" from TASKING
> Inc.?

You are not only doing cross compiling, additionally you are using a toolchain 
which is not yet supported by cmake, so this has to be added.
I.e. the toolchain has to be recognized, and a Modules/Compiler/Tasking.cmake 
or something like this needs to be added.

Please put this in a new bug in the bug tracker at 
http://public.kitware.com/Bug/my_view_page.php , then we can continue there.

Alex


More information about the CMake mailing list