Re: [CMake] Cross-compiling a static library (CMake 2.8.3)

2011-02-08 Thread Alexander Neundorf
On Monday 07 February 2011, Emmanuel Blot wrote: FWIW: I found why I use CMAKE_FORCE_C_COMPILER rather than the simpler CMAKE_C_COMPILER command: I build projects for eCos from outside the eCos tree directory, and CMake has some trouble finding the eCos header files when simply using

Re: [CMake] Cross-compiling a static library (CMake 2.8.3)

2011-02-07 Thread Emmanuel Blot
FWIW: I found why I use CMAKE_FORCE_C_COMPILER rather than the simpler CMAKE_C_COMPILER command: I build projects for eCos from outside the eCos tree directory, and CMake has some trouble finding the eCos header files when simply using CMAKE_C_COMPILER. It complains about CMAKE_FIND_ROOT_PATH

Re: [CMake] Cross-compiling a static library (CMake 2.8.3)

2011-01-20 Thread Alexander Neundorf
On Monday 10 January 2011, Emmanuel Blot wrote: INCLUDE (CMakeForceCompiler) CMAKE_FORCE_C_COMPILER (arm-eabi-gcc-4.5.2 GNU 4) I haven't used that one before. FWIW: I found why I use CMAKE_FORCE_C_COMPILER rather than the simpler CMAKE_C_COMPILER command: I build projects for eCos from

Re: [CMake] Cross-compiling a static library (CMake 2.8.3)

2011-01-10 Thread Emmanuel Blot
I'm getting the following warning message: From http://www.cmake.org/pipermail/cmake/2010-September/039705.html, it seems on my development environment that _CMAKE_TOOLCHAIN_PREFIX is left empty. If I force this variable to the expected value (arm-eabi-), the proper tools are detected and

Re: [CMake] Cross-compiling a static library (CMake 2.8.3)

2011-01-10 Thread Bjørn Forsman
Hi, On 10 January 2011 17:00, Emmanuel Blot eblot...@gmail.com wrote: Hello, Using the ADD_LIBRARY command for a static library (.a), how to tell CMake to use the ranlib tool for the target, not the default one for the host? I'm getting the following warning message: cd watchdog

Re: [CMake] Cross-compiling a static library (CMake 2.8.3)

2011-01-10 Thread Bjørn Forsman
Hi, (CCing the list.) 2011/1/10 Emmanuel Blot eblot...@gmail.com: When I cross compile I do set(CMAKE_C_COMPILER arm-linux-gcc) in a toolchain file and CMake automatically finds ranlib (and other toolchain utilities) using the prefix from the C compiler. How do you setup CMake for

Re: [CMake] Cross-compiling a static library (CMake 2.8.3)

2011-01-10 Thread Emmanuel Blot
The docs say that the signature is CMAKE_FORCE_C_COMPILER(compiler compiler-id) so maybe something bad happens when you give it that extra argument 4? Try without 4? Actually, it changes nothing. *but* if I remove the specific version number for the compiler, i.e. I define FIND_PROGRAM