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 (
http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_SIZEOF_VOID_P.html).

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.
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to