<div dir="ltr">Hi,<div><br></div><div>In Unix shell we can do that:</div><div style>$ VAR=foo cmd in out</div><div style><br></div><div style>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 style><br></div><div style>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 style><br></div><div style>add_custom_command(</div><div style>
OUTPUT out</div><div style> COMMAND cmd in out</div><div style> DEPENDS in</div><div style> ENVIRONMENT VAR foo</div><div style> )</div><div style><br></div><div style>Any idea?</div><div style><br></div><div style>
Cheers,</div><div style><br></div><div style>-- <br></div><div>Nicolas Desprès<br>
</div></div>