[CMake] How to set flags to build in Linux64 and Linux32?

Cherry Liu Cherry.Liu at Starz.com
Wed Feb 11 16:16:25 EST 2009


 

Hi all,

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? I tried to google for an answer for the past 1 hour and
couldn't find anything. I'd really appreciate it if someone could show
me the way!

 

Thanks in advance :-)

Cherry 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090211/12a1530f/attachment.htm>


More information about the CMake mailing list