Can you share a bit more context? I suspect there may be no single correct answer, as it depends on your situation what the best way is. If you are using a toolchain file you will have to put the decision of using that file outside of your cmake file. You can also opt to put a check inside your cmake file and set compiler flags (-m32 / -m64) accordingly. Using a toolchain file is more flexible when releasing a project, but autoconfiguring is nice when running builds on buildservers through ctest scripts.
Regards, Micha On 02/15/2013 11:46 AM, Martin Koller wrote: > Hi all, > > for the question above I found different answers on the web, so I'm puzzled > and wanted to know an authoritative answer from the cmake gurus. > > What I found: > http://www.vtk.org/Wiki/CMake_Cross_Compiling#Information_how_to_set_up_various_cross_compiling_toolchains > => "On mixed 32/64 bit Linux installations cross compilation cannot be used > to build for 32/64 bit only." > > but also: > > http://stackoverflow.com/questions/4131158/how-to-cross-compile-for-linux-x86-with-linux-amd64-cmake-and-g > => talking about using a toolchain file ... > > so please tell me: what is the correct way or is there no way ? > -- 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