I am creating a C ++ project that will be created for 32-bit and 64-bit versions of Windows and Ubuntu. I am using CMake 2.8.4 and, after playing with him for several hours, I got VS2010 32-bit and 64-bit projects. The problem I ran into is that the generator for Eclipse on the Ubuntu side (technically for Eclipse generators on all platforms) does not have separate versions for 32-bit / 64-bit versions.
I understand that there is a GCC compiler to indicate what type of bit you want (-m32, -m64), and I do not mind having separate solutions, but when I run cmake in the assembly directories, tell me which one I want ? If there is no built-in method, is it possible to pass a custom variable / value, for example BITTYPE=64 , to cmake? That way, I could handle the rest in the CMakeLists.txt file with a simple if / else.
source share