Cherry Liu wrote:
I'm pretty green with CMake and I'm trying to build a project in both
Linux64 and Linux32, respectively. The compiler I'm using is GCC. Right
now, I don't know what flags or what special commands to pass into my
CMake template for this to happen.
The code I'm thinking of is:
if( GCC )
add_definitions( -DAW_NEW_IOSTREAMS )
set_target_properties( DEBUG RELEASE PROPERTIES COMPILE_FLAGS -m64
LINK_FLAGS -m64 )
endif()
the -m64 flag is borrowed from BJam, but it doesn't work at all. There
has to be a CMake flag that tells the compiler to build either 64 or 32
bit, right?
There is; -m64/-m32.
What isn't working in the above example? Do you get a 64-bit binary?
(Note that x86_64 Linux distros tend to default to -m64.) What happens
if you try -m32?
--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
"Braaaaaaaaiins!" -- Zombies
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake