[CMake] makefile environment variables

Daniel Stonier d.stonier at gmail.com
Wed Oct 22 02:32:11 EDT 2008


Its only a convenience thing, so not hugely important.

Usually in a cross-compile environment you run a script (or append to
your .bashrc file) some extra environment variables necessary for the
cross-compile environment. Then you build. If you were just using
Makefiles you can just add these environment variables directly to the
Makefile. With the CMake layer there though, I can't do that - can set
them in CMake itself, but it'd be nice if it would transfer these to
the Makefile as well.

2008/10/22 Alexander Neundorf <a.neundorf-work at gmx.net>:
> On Tuesday 21 October 2008, Daniel Stonier wrote:
>> Is there any means of getting cmake to insert an environment variable
>> into the makefiles it generates?
>>
>> I know you can do the following:
>>
>> SET(ENV{PATH} /opt/eldk/usr/bin/ccache:/opt/eldk/usr/bin:$ENV{PATH})
>> SET(ENV{CROSS_COMPILE} ppc_4xxFP-)
>>
>> and this is sometimes useful for getting cmake to do things without
>> having to externally configure your environment, but it doesn't carry
>> on to the makefile. So you still need to rely on an externally
>
> So you have some problem with cross compiling ? What exactly do you want to do
> that doesn't work ?
>
> Alex
>


More information about the CMake mailing list