I'm trying to get cross compilation of a simple library working to build a 
windows library on a linux box using the visual studio compilers. So far the 
farthest I've gotten is with:

./cmake-2.8.9-Linux-i386/bin/cmake ../rmf -DCMAKE_SYSTEM_NAME=Windows 
-DCMAKE_C_COMPILER=/usr/bin/cl -DCMAKE_CXX_COMPILER=/usr/bin/w32cc 
-DCMAKE_RC_COMPILER=/bin/true

You can find the cmake output at <https://gist.github.com/3897173>. Basically, 
it seems to partly figure out the compilers, but then tries to test cl by 
passing the source file using "-c" and a unix path, both of which cl drops on 
the floor. The command is
 /usr/bin/cl /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi /Ob0
  /Od /RTC1 /FoCMakeFiles/cmTryCompileExec3161846472.dir/testCCompiler.c.obj
  
/Fd/synth1/home/drussel/rmf-build/CMakeFiles/CMakeTmp/cmTryCompileExec3161846472.pdb
  -c /synth1/home/drussel/rmf-build/CMakeFiles/CMakeTmp/testCCompiler.c

This is using the build of cmake 2.8.9 for linux i386 downloaded from the 
kitware site.

The RC compiler bit is a suggestion I found while searching around as cmake 
demanded an RC compiler, which I don't think will get used. But better 
suggestions are welcome. 

Thanks for any suggestions.
        --Daniel
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to