On ubuntu 10.10 64bit I want to compile something with cmake for a 32 bit开发者_如何学C ubuntu 10.10 system. How can I do that via a shell command in cmake?
In CMakeLists.txt add
CMAKE_CXX_FLAGS="-m32"
CMAKE_C_FLAGS="-m32"
make sure that any libraries you are linking to are compiled for 32 bit.
精彩评论