<div dir="ltr"><div>Hi,</div><div><br></div><div>In Unix shell we can do that:</div><div>$ VAR=foo cmd in out</div><div><br></div><div>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.</div>
<div><br></div><div>I would like to be able to do the same for a custom command in CMake. Ideally I was looking for something like that:</div><div><br></div><div>add_custom_command(</div><div> OUTPUT out</div><div> COMMAND cmd in out</div>
<div> DEPENDS in</div><div> ENVIRONMENT VAR foo</div><div> )</div><div><br></div><div>Any idea?</div><div><br></div><div>Cheers,</div><div><br></div>-- <br>Nicolas Desprès<br>
</div>