On 07/19/2013 10:36 AM, Nicolas Desprès wrote:
> Hi,
> 
> In Unix shell we can do that:
> $ VAR=foo cmd in out
> 
> This way the environment variable is only set in the environment of the 
> process of the command and not the in current shell like when using the 
> "export" built-in.
> 
> I would like to be able to do the same for a custom command in CMake. Ideally 
> I was looking for something like that:
> 
> add_custom_command(
>   OUTPUT out
>   COMMAND cmd in out
>   DEPENDS in
>   ENVIRONMENT VAR foo
>   )

There has been some progress here:

https://github.com/Kitware/CMake/pull/31

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to