<div dir="ltr">If your project is supposed to be built 64-bit only on 64-bit build host and 32-bit only on 32-bit one, you can just append proper flag into CMAKE_CXX_FLAGS and CMAKE_C_FLAGS depending on the value of CMAKE_SIZEOF_VOID_P (<a href="http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_SIZEOF_VOID_P.html">http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_SIZEOF_VOID_P.html</a>).<div><br></div><div>In the case of multi-lib OS (where you can build both 32-bit and 64-bit app on the same 64-bit build host) you could specify something like -DPLATFORM=32 -DPLATFORM=64 when you invoke CMake. The approach would require you to have two separate build trees though.</div></div>