[CMake] How to pass a flag to be used by cmake?

Georgios Petasis petasisg at yahoo.gr
Mon Jul 9 06:47:14 EDT 2012


Hi all,

I want to build 32-bit binaries on a 64-bit Linux system, with gcc.
In projects that use configure, this is easy:

export CFLAGS=-m32

But how can I do the same with cmake projects?

cmake does not seem to use CFLAGS. Is there a variable I can define when 
I run cmake, to pass the -m32 flag to gcc?

George


More information about the CMake mailing list