[CMake] 32-bit mode on 64-bit machine

2011-05-26 Thread Sara Rolfe
Hello, I'd like to force a 64-bit machine to build a 32-bit program. Can I control this using CMake? Thanks, Sara ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Re: [CMake] 32-bit mode on 64-bit machine

2011-05-26 Thread Glenn Coombs
I do exactly that for my project using these lines: if(UNIX) # only build 32-bit binaries add_definitions(-m32) set(CMAKE_EXE_LINKER_FLAGS${CMAKE_EXE_LINKER_FLAGS} -m32) set(CMAKE_SHARED_LIBRARY_C_FLAGS${CMAKE_SHARED_LIBRARY_C_FLAGS}