[CMake] How to set Environmental Variable in Makefile?
Matthew Woehlke
mw_triad at users.sourceforge.net
Thu Jan 22 18:13:11 EST 2009
Wang, Huyi (GE Healthcare) wrote:
> Hi, any suggestions?
>
> ________________________________
>
> Question:
> Is there a way to set value for an environmental variable, e.g. $PATH, and let it be valid in Makefile? ENV{XXX} can only be valid when cmake is runing, not for make.
>
> Reason:
> Some commands depend on some environmental varialbes.
> Right now I'm trying to run "omniidl" to build corba idl files, it needs PYTHONPATH to be set correctly, otherwise this command can't run. I checked its switches, there isn't such a switch that can let omniidl know this path.
>
>
> ------------------------------------------------------------------------
Wrap the command in a cmake script? Otherwise I believe the generic
answer is "no", because of the complexity (and in some cases,
impossibility) of making this work in all the generators CMake supports.
--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
Who let the hippos out?
More information about the CMake
mailing list