[CMake] 64bit linking on linux
Bill Hoffman
bill.hoffman at kitware.com
Wed Feb 18 13:50:59 EST 2009
Aaron Turner wrote:
>>>
>> That is not the preferable way to do this. As it hard codes flags into the
>> CMake file. The way I would do it is:
>>
>> export CXXFLAGS=-m64
>> export CFLAGS=-m64
>> export LDFLAGS=-m64
>>
>> cmake ../myproject
>>
>> If those environment variables are set BEFORE you run cmake, then cmake will
>> put them into the cache correctly.
>
> Couldn't you use the check_c_source_runs() macro to test if your
> system supports the -m64 flag? That way you wouldn't need to require
> the user to specify it (always fraught with peril).
>
>
You could if you always wanted a 64 bit app. It is really up to the
project.
-Bill
More information about the CMake
mailing list